📄 ex7_2a.m
字号:
%%%%%%%%%%%%%%%%%% Example 7.2a %%%%%%%%%%%%%%%%%
% Discrete-Time Control Problems using %
% MATLAB and the Control System Toolbox %
% by J.H. Chow, D.K. Frederick, & N.W. Chbat %
% Brooks/Cole Publishing Company %
% September 2002 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ---- Mapping s-plane to z-plane poles ----
% ---- part (a); horizontal s-plane lines ----
%
clear
disp('Example 7.2(a)')
Ts = 0.1; % sampling period
% ------------- set up s-plane poles --------------
xx = [0:0.05:1]'; % set of values from 0...1
N = length(xx);
s0 = -xx*35; % negative real axis
% generate an array, each column is a horizontal line
% the real part of each column is identical
s = s0*[1 1 1 1 1] + ...
j*ones(N,1)*[0 0.25 0.5 0.75 1]*pi/Ts;
% draw s-plane loci - also for Script 7.2(b), (c), and (d)
figure
plot(real(s(:,1)),imag(s(:,1)),'-o',real(s(:,2)),imag(s(:,2)),'-s',...
real(s(:,3)),imag(s(:,3)),'-^',real(s(:,4)),imag(s(:,4)),'-*',...
real(s(:,5)),imag(s(:,5)),'-v','MarkerSize',9), sgrid
xlabel('Real part of s')
ylabel('Imaginary part of s')
title('Lines of constant undamped natural frequency in the s-plane')
hold on
plot([-35 5],[0 0])
plot([0 0],[-5 35])
hold off
axis equal
axis([-35 5 -5 35])
disp('******>'), pause
% conversion to z-plane poles - also for Script 7.2(b), (c), and (d)
z = exp(s*Ts);
% draw z-plane loci
figure
plot(real(z(:,1)),imag(z(:,1)),'-o',real(z(:,2)),imag(z(:,2)),'-s',...
real(z(:,3)),imag(z(:,3)),'-^',real(z(:,4)),imag(z(:,4)),'-*',...
real(z(:,5)),imag(z(:,5)),'-v','MarkerSize',9), zgrid
axis equal
axis([-1 1 0 1])
xlabel('Real part of z')
ylabel('Imaginary part of z')
title('Mapping of lines of constant undamped natural frequency in the z-plane')
%%%%%%%%%%
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -