取得連結 Facebook X Pinterest 以電子郵件傳送 其他應用程式 4月 28, 2026 Please download 2 files from this shared folder:https://365nchu-my.sharepoint.com/:f:/g/personal/g110064759_365_nchu_edu_tw/IgDqrDItFYfoRJagmuT-bgMsAZJQNbDZgig4cZ9i5bLlPOY?e=Qf5cnY 取得連結 Facebook X Pinterest 以電子郵件傳送 其他應用程式 留言
3月 24, 2026 clc; clear; close all; % 定義 s s = tf('s'); % Transfer function G = 400 / ((s+1)*(s^2 + 4*s + 400)); %% 1️⃣ 畫 Bode Plot + Margin figure; margin(G); % 直接給你 GM, PM, Wcg, Wcp grid on; %% 2️⃣ 抓出所有數據 [GM, PM, Wcg, Wcp] = margin(G); fprintf('Gain Margin (GM) = %.4f\n', GM); fprintf('Phase Margin (PM) = %.4f deg\n', PM); fprintf('Gain crossover frequency (Wcg) = %.4f rad/s\n', Wcg); fprintf('Phase crossover frequency (Wcp) = %.4f rad/s\n', Wcp); %% 3️⃣ Bandwidth bw = bandwidth(G); fprintf('Bandwidth (BW) = %.4f rad/s\n', bw); %% 4️⃣ Resonance Peak & Frequency [mag, phase, w] = bode(G); mag = squeeze(mag); [Mr, idx] = max(mag); wr = w(idx); fprintf('Resonance Peak (Mr) = %.4f\n', Mr); fprintf('Resonance Frequency (wr) = %.4f rad/s\n', wr); %% 5️⃣ Polar Plot figure; nyquist(G); % 或用 polarplot (Nyquist更常用) grid on; title('Nyquist Plot'); 閱讀完整內容
3月 31, 2026 clc; clear; close all; %% ===== G1(s) ===== num1 = [1 5 4]; den1 = [1 6 11 6]; G1 = tf(num1, den1); disp('G1(s) = '); G1 %% G1 controllable canonical form Ac1 = [0 1 0; 0 0 1; -6 -11 -6]; Bc1 = [0; 0; 1]; Cc1 = [4 5 1]; Dc1 = 0; sys1_c = ss(Ac1,Bc1,Cc1,Dc1); disp('G1 controllable canonical form:'); sys1_c disp('Transfer function from controllable form:'); tf(sys1_c) rank_ctrb_G1c = rank(ctrb(Ac1,Bc1)) rank_obsv_G1c = rank(obsv(Ac1,Cc1)) %% G1 observable canonical form Ao1 = [0 0 -6; 1 0 -11; 0 1 -6]; Bo1 = [4; 5; 1]; Co1 = [0 0 1]; Do1 = 0; sys1_o = ss(Ao1,Bo1,Co1,Do1); disp('G1 observable canonical form:'); sys1_o disp('Transfer function from observable form:'); tf(sys1_o) rank_ctrb_G1o = rank(ctrb(Ao1,Bo1)) rank_obsv_G1o = rank(obsv(Ao1,Co1)) %% ===== G2(s) ===== num2 = [1 3]; den2 = [1 2 5]; G2 = tf(num2, den2); disp('G2(s) = '); G2 %% G2 controllable canonical form Ac2 = [0 1;... 閱讀完整內容
留言
張貼留言