Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (* Defination of state space matrix *)
- A = {{-833.3 ,-25.18} , {5193 ,-7.145}} ;
- B = { {303.03},{0}} ;
- c={{ 0 , 60/(2*[Pi]) }};
- d= {{0}} ;
- (* Response to 12 volt supply ( Analog ) *)
- ssmC= StateSpaceModel[{A, B, c, d } ]
- Res=OutputResponse[ssmC , 12 , t ] ;
- PlotA=Plot[ {Res}, {t,0, 15 },PlotLabel-> {" step Response "}, PlotRange-> 1500]
- (* Response to 12 volt supply (ZOh) *)
- DssmZoH= ToDiscreteTimeModel [ssmC , 0.020 ,Method -> "ZeroOrderHold"]
- Res = OutputResponse[DssmZoH ,12*UnitStep[n], n ]
- PlotB= DiscretePlot[{ Res },{n,0,80} , PlotLegends -> {"ZoH " }, PlotRange-> 1500]
- (* Response to 12 volt supply (FD) *)
- add= {{1,0} , {0,1}} + 0.0020*A
- ddd= 0.0020*B
- ssmC=StateSpaceModel[{add, ddd , c, d },SamplingPeriod->0.0020 ]
- Res6=OutputResponse[ssmC ,12*UnitStep[n], n ] ;
- PlotC= DiscretePlot[{ Res6 },{n,0,40} , PlotLegends -> {"Forword diff" }, PlotRange-> 1500]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement