lab reportالدردار
lab reportالدردار
Lab report
ID: 022171912
Date:25/5/2022
Supervisor:Dr.Mohamed Edardar
Spring 2022
objectives:
1. to design a state feedback control system and simulate the response for open and closed
loop system
2. to use Matlab and Simulink in system analysis and design
Introduction:
State variable feedback allows the flexible selection of linear system dynamics. Often, not all
state variables are available for feedback, and the remainder of the state vector must be
estimated.
State feedback involves the use of the state vector to compute the control action for specified
system dynamics. Figure 1.1 shows a linear system (A, B, C) with constant state feedback gain
matrix K.
Using the rules for matrix multiplication, we deduce that the matrix K is m × n so that for a
single-input system K is a row vector. The equations for the linear system and the feedback
control law are, respectively, given by the following equations:
x ( k +1 )= Ax ( k )+ Bu ( k )
y ( k )=Cx ( k )
u ( k ) =−kx ( k ) + v (k )
The two equations can be combined to yield the closed-loop state equation:
x ( k +1 )= Ax ( k )+ B [ −kx ( k )+ v ( k ) ]
¿ [ A−Bk ] x ( k ) + Bv ( k )
x ( k +1 )= A cl x ( k )+ Bv ( k )
y ( k )=Cx(k)
The dynamics of the closed-loop system depend on the eigenstructure (eigenvalues and
eigenvectors) of the matrix Acl. Thus, the desired system dynamics can be chosen with
appropriate choice of the gain matrix K.
For many physical systems, it is either prohibitively costly or impossible to measure all the state
variables. The output measurements y must then be used to obtain the control u as shown in
Figure 1.2
u ( k ) =−ky ( k ) + v ( k )
¿−kCx ( k ) +v (k)
x ( k +1 )= Ax ( k )+ B [ −kCx ( k ) + v ( k ) ]
Intuitively, less can be accomplished using output feedback than state feedback because less
information is used in constituting the control law. In addition, the postmultiplication by the C
matrix restricts the choice of closed-loop dynamics. However, output feedback is a more general
design problem because state feedback is the special case where C is the identity matrix[1].
In this experiment a system is controlled using stare feedback and output feedback ,the system is
designed and implemented using simulation software matlab and matlab simulink ,and the
implementation is done it two methods .
Experimental procedure:
The system described in state space as the following matrix :
2. after running the simulation the response was shown in the scope block
Fig.2.2 response of the uncompensated system
3. in matlab command window the place command was used to find the gain matrix k
4. the state feedback circuit was implemented and connected to the system
B. Method 2:
1. A state-space block is added and the parameters are added from the properties window.
We want the output of the block to be the states so we change the values of matrixes C and D
to [1 0 ;0 1] and [0;0] respectively
2. A multiplexer was added and connected to the output of the block in order to add the
feedback circuit
Fig.3.2 compensated system
3. A demultiplexer is added to show the output response in the scope and compared to the
output from the first method
3. The output in shown in the scope block after running the simulation
Discussion:
From the beginning we notice that the system is unstable and in need for control.
In the first part state feedback was used to change the dynamics of the system, two
methods in matlab simulink were used the first one using intergrators and gain to
implement the system ,after running the simulation we notice that the system has
become stable with the desired specification.
The second method is by using the state space block were we just insert the values
of our system matrixes, but in the second method the output of the block is not the
states and since this is state feedback we need our states in order to control the
system, therefor we changed the C matrix so the output is the states.
By comparing the output from both methods we find them to be identical ,which
was expected .
In the second part output feedback control was designed for the same system where
the values of the observer matrix was found and then implemented.
We notice that in output feedback we didn’t need the states to design the
compensator and obtain stability which is more efficient when the states of the
system are hard to measure.
Conclusion:
State feedback and output feedback are a design approach for designing feedback
compensators for systems described in state-space model, both and are used to
obtain stability and a desired transient response, but state feedback uses the states
of the system while output feedback uses the output of the system for the
compensation.
References:
[1] M. Sami Fadali, Antonio Visioli Digital Control Engineering Analysis and
Design.