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

📄 ex7_2d.m

📁 离散控制系统设计的MATLAB 代码
💻 M
字号:
%%%%%%%%%%%%%%%%%% Example 7.2d %%%%%%%%%%%%%%%%%
%   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 (d): constant undamped natural frequency s-plane line ----
%
clear
disp('Example 7.2(d)')
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
phi = xx*pi/2;   					  % equal angles from 0 --> 90 deg
% generate an array, each column is a constant frequency line 
s0 = (pi/Ts)*(-cos(phi)+j*sin(phi));  % arc of radius pi/Ts
s = s0*[1 0.75 .5 .25 0];

% 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 natural frequency \omega_n in the s-plane')
hold on
plot([-35 5],[0 0])
plot([0 0],[-5 35])
axis equal 
axis([-35 5 -5 35])
hold off
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('Lines of constant natural frequency \omega_n in the z-plane')
%%%%%%%%%%

⌨️ 快捷键说明

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