If a linear time invariant system is represented by A,B,C,D, a zero pole representation can be obtained like this:
uses MtxExpr, Math387, MtxVec, MtxVecTee, MtxVecEdit, LinearSystems; procedure TForm1.Button1Click(Sender: TObject); var a: Matrix; z,p,b,c: Vector; d,k: Double; begin a.SetIt(3,3,false,[0,1,2, 2,3,4, 5,6,3]); b.SetIt(false,[1,0.5,2]); c.SetIt(false,[1,2.5,2]); d := 1; // .... get a state space version and store in A,B,C,D a.Eig(p); //compute poles LTIZeros(z,k,a,b,c,d); //get zeros and gain ViewValues(z,'Zeros',true); ViewValues(p,'Poles',true); end;
#include "MtxExpr.hpp" #include "MtxVecEdit.hpp" #include "MtxVecTee.hpp" #include "LinearSystems.hpp" void __fastcall TForm41::BitBtn1Click(TObject *Sender) { Vector z,p,b,c; double d,k; Matrix a; a->SetIt(3,3,false,OPENARRAY(double,(0,1,2, 2,3,4, 5,6,3))); b->SetIt(false,OPENARRAY(double,(1,0.5,2))); c->SetIt(false,OPENARRAY(double,(1,2.5,2))); d = 1; // .... get a state space version and store in A,B,C,D a->Eig(p); //compute poles LTIZeros(z,k,a,b,c,d); //get zeros and gain ViewValues(z,"Zeros",true); ViewValues(p,"Poles",true); }
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
|