Problems with Matlab Projects? You may face many Problems, but do not worry we are ready to solve your Problems. All you need to do is just leave your Comments. We will assure you that you will find a solution to your project along with future tips. On Request we will Mail you Matlab Codes for Registered Members of this site only, at free service...Follow Me.

Time Response Characteristics and LTI Viewer

Time Response Characteristics and LTI Viewer

LTI Viewer

The LTI ( Linear Time Invariant) Viewer is an interactive graphical user interface (GUI) for analyzing the time and frequency responses of linear systems and comparing such systems. In particular, some of the graphs the LTI Viewer can create are step and impulse responses, Bode, Nyquist, Nichols, pole-zero plots, and responses with arbitrary inputs. In addition, the values of critical measurements on these plots can be displayed with a click of the mouse. Table 5.1 shows the critical measurements that are available for each plot.

Table 5.1

-

Peak time or Peak frequency

Settling time

Rise time

Steady state value

Gain/phase margins; zero dB/1800 frequencies

Pole-zero value

Step

-

-

Impulse

-

-

-

-

Bode

-

-

-

-

Nyquist

-

-

-

-

Nichols

-

-

-

-

Pole-zero

-

-

-

-

-

Here we provide steps you may follow to use the LTI Viewer to plot time and frequency responses.

  1. Access the LTI Viewer: The LTI Viewer window, shown in Fig. M5.1, can be accessed by typing ltiview in the MATLAB Command Window or by executing this command in an M-file.

2. Create LTI transfer functions: Create LTI transfer functions for which you want to obtain responses. The transfer functions can be created in an M-file or in the MATLAB Command Window. Run the M-file or MATLAB Command Window statements to place the transfer function in the MATLAB workspace. All LTI objects in the MATLAB workspace can be exported to the LTI Viewer.

The following MATLAB commands create the transfer function .

>> s = tf('s');

>> G = 1/(s+1);

  1. Select LTI transfer functions for the LTI Viewer: Choose Import? under the File menu in the LTI Viewer window and select all LTI objects whose responses you wish to display in the LTI Viewer sometime during your current session. Selecting G results in Fig. M5.3.


4. Select the LTI objects for the next response plot: Right-click anywhere in the LTI Viewer plot area to produce a pop-up menu. Under Systems, select or deselect the objects whose plots you want or do not want to show in the LTI Viewer. More than one LTI transfer function may be selected.

  1. Select the plot type: Right-click anywhere in the LTI Viewer plot area to produce a pop-up menu. Under Plot Types, select the type of plot you want to show in the

6. Select the characteristics: Right-click anywhere in the LTI Viewer plot area to produce a pop-up menu. Under Characteristics, select the characteristics of the plot you want displayed. More than one characteristic may be selected. For each characteristic selected, a point will be placed on the plot at the appropriate location.

The characteristics menu and the submenu are displayed in Fig. M5.4 obtained by importing a typical second-order transfer function.

Note the difference in the definition of rise time employed in the LTI Viewer with respect to the one used in the text.

  1. Interact with the plot:
    • Zoom In (Zoom Out): Select the Zoom In (Zoom Out) button (with the + () sign) on the tool bar. Hold the mouse button down and drag a rectangle on the plot over the area you want to enlarge (deluge), and release the mouse button.
    • Original View: Select Reset to Original View in the menu popped up by right-click to return to original view of your plot after zooming.
    • Grid: Select Grid in the right-click menu to on or off the grid. The right click menu will not work if any zoom button on the tool bar is selected.
    • Normalize: Select Normalize in the right-click menu to normalize all curves in view.
    • Characteristics: Read the values of the characteristics by placing the mouse on the characteristics point on the plot. Left-click the mouse to keep the values displayed (Fig. M5.5).
    • Properties: Select Properties in the right-click menu or double-click anywhere (except the curve) on the graph sheet to change the appearance of the graph. You can change the title, axes labels, and limits, font sizes and styles, colors, and response characteristics definitions.
    • Coordinates and curve: Left-click the mouse at any point on the plot to read the system identification and the coordinates (Fig. M5.5, shown by square block).
    • Add text and graphics: Under the File menu, choose Print to Figure. An additional figure with toolbar will open (Fig. M5.6).The toolbar of this figure has additional tools for adding text, arrows, lines, legends, and to rotate the figure.
    • Additional plot-edit capabilities: The Edit menu of the LTI Viewer and the figures created by selecting Print to Figure, offer a wide variety of controls over the plot presentation.
  2. Viewer preferences: Choose Viewer Preferences? in the Edit menu. LTI Viewer Preferences window (Fig. M5.7) will open. This allows users to set parameters such as units (Units), style of labels (Style), response characteristics definitions (Characteristics), and also provide a control over the time and frequency vector generation (Parameters).

Time Response Characteristics in MATLAB window

Example

Consider the position control system shown

.

and load)

(transfer function of power amplifier)

KA = preamplifier gain

sensitivity of input and output potentiometers

Time response characteristics of the system are generated by the following MATLAB script.

s = tf('s');

G1 = 100/(s+100);

G2 = 0.2083/(s*(s+1.71));

K = 1000;

G = series(K*G1,G2);

H = 1/pi;

M = series(feedback(G,H),H);

ltiview(M);

MATLAB response is shown in Fig

In the following we compare the time response characteristics of this system with the one obtained by replacing the power amplifier with a transfer function of unity (Fig. M5.10).

s = tf('s');

G1 = 1;

G2 = 0.2083/(s*(s+1.71));

K = 1000;

G = series(K*G1,G2);

H = 1/pi;

M1 = series(feedback(G,H),H);

ltiview(M1);

The second-order approximation seems to be quite reasonable.

The two responses in Figs M5.9 and M5.10 can be obtained in a single plot using the command ltiview(M,M1). Alternatively, choose Import... under the File menu in the LTI Viewer window and select M.

Example Consider a unity feedback system shown in Fig

We will consider the following three controllers:

D1(s) = 3; D2(s)=3+(15/ s ); and D3(s)=(3+(15/ s )+0.3 s )

The following MATLAB code generates the step responses shown in Fig. M5.12.

s = tf('s');

G = 59.292/(s^2+6.9779*s+15.12);

D1 = 3;

D2 = 3 + 15/s;

D3 = 3 + 15/s +0.3*s;

M1 = feedback(D1*G,1);

M2 = feedback(D2*G,1);

M3 = feedback(D3*G,1);

step(M1);

hold;

step(M2);

step(M3);

We need not access LTI viewer to find out the time response characteristics of the closed-loop system. The step command in MATLAB has this feature inbuilt in it as is seen in Fig. M5.12.

Note that adding the integral term increases the oscillatory behaviour but eliminates the steady-state error, and that adding the derivative term reduces the oscillations, while maintaining zero steady-state error.

Time Response Characteristics in SIMULINK window

Example

Consider a unity feedback, PID controlled system with following parameters:

Plant transfer function:

PID controller transfer function:

Reference input:

A Simulink block diagram is shown

The Simulink model inputs a step of 30 to the system.

Time response characteristics of the model developed in Simulink can be obtained by invoking the LTI Viewer directly from the Simulink. LTI Viewer for Simulink can be invoked by following Tools -- Control Design -- Linear Analysis as shown in Fig. M5.14.

Fig. M5.14

This opens Control and Estimation Tools Manager shown in Fig. M5.15.

Fig. M5.15

Select linearization input-output points by right clicking on the desired line and selecting Linearization Points in your Simulink model. Fig. M5.16 explains the selection of input point. Similarly output point has been selected. Once input-output linearization points appear in the Control and Estimation Tools Manager window, click on the Linearize Model at the bottom of the window (Fig. M.5.15). The type of response can be selected from the drop down menu just near the Linearize Model button. Other linear analysis plots available are: Bode, Impulse, Nyquist, Nichols, Bode magnitude plot, and pole-zero map.

Fig. M5.16

The step response with the characteristics is shown in Fig. M5.17.

Fig. M5.17

Example

Consider a unity feedback, PI controlled system with following parameters:

Plant transfer function:

Plant deat-time: = 0.15 minutes

PI controller transfer function:

Actuator saturation characteristic: Unit slope; maximum control signal =1.7.

Reference input:

A Simulink block diagram is shown in Fig. M5.18. PID controller block is available in Additional Linear block set in Simulink Extras block library. The parameters of PID controller block have been set as : P = 0.09, I = 0.95, and D = 0.

We can invoke LTI Viewer to determine the time response characteristics of the system of Fig. M5.18. However, LTI Viewer will linearize the system and then plot the characteristics. An alternative is to transfer the output response data to workspace using To Workspace block and then generate the time response using the plot command. A MATLAB code can then be written to determine the required characteristics. The following code gives settling time, peak overshoot, and peak time for the output response data of Fig. M5.18.

time = t.signals.values;

y = Y.signals.values;

plot(time,y);

title('Step response');

xlabel('Time (min)');

ylabel('Output');

ymax = max(y);

step_size = 10;

peak_overshoot = ((ymax-step_size)/step_size)*100

index_peak = find(y == ymax);

peak_time = time(index_peak)

s = length(time);

while((y(s)>=0.95*step_size) & (y(s)<=1.05*step_size))

s = s-1;

end

settling_time = time(s)

1 comments:

Anonymous said...

Great info. Lucky me I found your site by chance (stumbleupon).
I've saved as a favorite for later!
Also visit my webpage ... bangaldeshi searh engine

Post a Comment

Recent Comments

Popular Matlab Topics

Share your knowledge - help others

Crazy over Matlab Projects ? - Join Now - Follow Me

Sites U Missed to Visit ?

Related Posts Plugin for WordPress, Blogger...

Latest Articles

Special Search For Matlab Projects

MATLAB PROJECTS

counter

Bharadwaj. Powered by Blogger.