Continuous state-space system
This block realizes a continuous-time linear state-space system.
where x is the vector of state variables, u is the vector of input functions and y is the vector of output variables.
The system is defined by the (A, B, C, D) matrices and the initial state X0. The dimensions must be compatible.
This sample example illustrates how to use CLSS block to simulate and display the output waveform y(t)=Vc(t) of the RLC circuit shown below.
The equations for an RLC circuit are the following. They result from Kirchhoff’s voltage law and Newton’s law.
The R, L and C are the system’s resistance, inductance and capacitor.
We define the capacitor voltage Vc and the inductance current iL as the state variables X1 and X2.
thus
Rearranging these equations we get:
These equations can be put into matrix form as follows,
The required output equation is
The following diagram shows these equations modeled in Xcos where R=10Ω, L=5 mΗ and C=0.1µF; the initial states are x1=0 and x2=0.5.
To obtain the output Vc(t) we use CLSS block from Continuous time systems Palette.
` `_