

The MatLab ctrb() and obsv() functions will create these matrices for youĪutomatically. Recall that the controllability matrix, U, and observability matrix, V, are You should find that diagonalsys2 and the original diagonalsys are the same, and that the returned transformation matrix L is equal to the inverse of the eigenvector matrix T determined previously.Ĭ. The transformed system equations and the transformation matrix This is just a shortcut to what we did above, providing both Into diagonal canonical form, using the "canon()" function. Provides a more convenient method for converting a system The above approach works for any given transformation, i.e. Velocity (x2) of the system will decay exponentially to y=0. Position y(0) = x1(0) = yo, then both the displacement (x1) and This implies that the unforced (natural, homogeneous) response of the This should be expected due to the invariance of the system'sĬharacteristic equation under any given similarity transformation.Īlso, note that both eigenvalues of the system are negative. Which corresponds to the eigenvalues of the original matrix AĪs was seen from the eig() command above. Note that the A matrix has been converted to a diagonal form.įurthermore, the diagonal elements are -0.2792 and -2.3874, The resulting transformed A,B,C,D matrices can be extracted Now the transformed system can be generated by entering: This, the desired transformation matrix is, = EIG(X) produces a diagonal matrix D of eigenvalues and aįull matrix V whose columns are the corresponding eigenvectors. Next, form the transform matrix T using the "eig()" function, Thus, the MatLab transformation matrix L is the inverse of the We used "xbar" instead of "z" in class, but you get the idea). Where the transformation is defined as x = Tz (well, actually,

X = Tz where T =, pi = ith eigenvector of Aįirst, note that MatLab's transformation is slightly different from lecture, The ss2ss() function performs this transformation directly.įor example, the system created in part A can be converted intoĭiagonal canonical form using the following transformation State vector, L is a linear transformation matrix, and z is the Model with controllable, uncontrollable, observable, and unobservableĬonsider a state transformation z = Lx, where x is the original State transformations using ss2ss(), canon()įor converting between various canonical state-space forms, andįor reconfiguring a given state-space models into a transformed
Construct diag matlab full#
Model, it is first converted to the state-space representation.įinally, the rss() command may be used to generate a random state-space model.įor full syntax, enter "help rss" within MatLab.ī. = SSDATA(SYS) retrieves the matrix data A,B,C,Dįor the state-space model SYS. State-space model may be extracted using the ssdata() command, Given a SYS object, the component A, B, C, D matrices of the Step(), lsim(), etc., can be used on the state-space model of this system. Using this SYS object, all the MatLab system response tools such as To create this state-space system within Matlab, use the ss()įunction, which generates a SYS object, just like the tf() commandįor transfer function system representations: Output is simply the mass position, x(t). The output equation in this state-space model assumes the system In this manner, the CCF form of the system becomes:

As you learned in lecture, thisĬonversion is done using the following state definitions: Īn easy state-space form to convert this system into is theĬontrollability canonical form (CCF). The differential equation for this simple system is.

To begin, consider the same spring-mass-damper system from model creation using ss(), ssdata(), rss() Ssdata - extraction of state-space data from a SYS modelĬanon - canonical state-space realizationsĪ. Of linear systems tools, a number of specialized state-space designĪnd analysis tools are available through the Control Systems Toolbox. In addition to MatLab's standard selection State space modeling of dynamic LTI systems allows the control systemĭesigner to bring the vast array of tools from linear system theory Lab 4 : MATLAB for controls - state space analysis Studio 4 : MATLAB for controls - state space analysis
