Adaptive Model Predictive Controller

3 ビュー (過去 30 日間)
Dafom
Dafom 2024 年 11 月 16 日
編集済み: Dafom 2024 年 11 月 16 日
I am working on LFC using adaptive model predictive controller (AMPC). The code i generated for Update Model Plant is showing Mat.A does not match with AMPC A input in terms of dimension and matrix size. What should i do?
Below is the code of one of the "Update Model Plant" for area 1.
function [A, B, C, D, U, Y, X, DX] = area1_thermal_control(freq_dev, tie_line_dev, control_input)
% Inputs:
% freq_dev: Frequency deviation (scalar)
% tie_line_dev: Tie-line power deviation (scalar)
% control_input: Control signal (governor output)
% Outputs:
% A, B, C, D: 3D State-space matrices (for all prediction steps)
% U: Control input (scalar)
% Y: Output (frequency deviation, scalar)
% X: State vector [freq_dev; tie_line_dev]
% DX: Rate of change of state vector
% Define prediction horizon
P = 10; % Number of prediction steps
% Thermal power plant 3D state-space matrices
A_base = [-0.05, 0; 0, -2];
B_base = [1; 0];
C_base = [1, 0];
D_base = 0;
  2 件のコメント
John D'Errico
John D'Errico 2024 年 11 月 16 日
What should you do? Since you show no code, you should write better code.
If you want better help, you need to provide some basis so someone can help you. Make it possible to get help, or the only possible answer is as I gave it above.
Dafom
Dafom 2024 年 11 月 16 日
編集済み: Dafom 2024 年 11 月 16 日
Hi Sir John D'Errico.
Below is the code of one of the 'Update Model Plant' for Area 1. Kindly go through and see how you can help out.
function [A, B, C, D, U, Y, X, DX] = area1_thermal_control(freq_dev, tie_line_dev, control_input)
% Inputs:
% freq_dev: Frequency deviation (scalar)
% tie_line_dev: Tie-line power deviation (scalar)
% control_input: Control signal (governor output)
% Outputs:
% A, B, C, D: 3D State-space matrices (for all prediction steps)
% U: Control input (scalar)
% Y: Output (frequency deviation, scalar)
% X: State vector [freq_dev; tie_line_dev]
% DX: Rate of change of state vector
% Define prediction horizon
P = 10; % Number of prediction steps
% Thermal power plant 3D state-space matrices
A_base = [-0.05, 0; 0, -2];
B_base = [1; 0];
C_base = [1, 0];
D_base = 0;
% Replicate matrices across the third dimension

サインインしてコメントする。

回答 (0 件)

製品


リリース

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by