⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex7_2b.m

📁 离散控制系统设计的MATLAB 代码
💻 M
字号:
%%%%%%%%%%%%%%%%%% Example 7.2b %%%%%%%%%%%%%%%%%
%   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 (b); vertical s-plane lines ----
%
clear
disp('Example 7.2(b)')
Ts = 0.1;								% sampling time
% ------------- set up s-plane poles --------------
xx = [0:0.05:1]'; 					% set of values from 0...1
N = length(xx);                     % number of points in xx
s0 = j*xx*pi/Ts; 					% imaginary axis
% generate an array, each column is a vertical line 
s = ones(N,1)*[0 -5 -10 -20 -30] + s0*[1 1 1 1 1] ;
% draw s-plane loci 
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 \sigma in the s-plane')
hold on
plot([-35 5],[0 0])
plot([0 0],[-5 35])
hold off
axis equal 
axis([-35 5 -5 pi/Ts])
disp('******>'), pause

%----- conversion to z-plane poles ------
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 \sigma in the z-plane')
%%%%%%%%%%

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -