📄 clab_help.m
字号:
%clab_help is the function to display the help information in CrtlLAB and Matx_Proc.
%
% clab_help(nTask)
%where
% nTask -- is the Help information code
%
%The functions available in the module are
%
% help_window --- displays help information
% shw_about display the About dialog box in CtrlLAB.
%
%Copyright (c) 1997-1999 by Professor Dingyu Xue
%School of Information Science and Engineering, Northeastern University
%Shenyang 110006, P R China
%Email: xue_dy@hotmail.com
%--------------------------------------------------------------------------
function clab_help(nTask)
bHelp=1;
%According to the Help code, select approperiate help information to display.
%For details of the Help code, please check the hlp_Title in each case.
switch nTask
case -1,
hlp_Title='Quick Start with CtrlLAB';
hlp_Contents=str2mat(...
'To start with CtrlLAB, one should enter the system models by clicking the',...
'blocks on the dialog box in the main window. The user are allowed to enter',...
'the models in different ways as in the dialog box.',' ',...
'If the plant model has been entered, the one can select the {\itModel} menu',...
'to modify, display and processing the models.',' ',...
'One can also select the {\itAnalysis} menu to perform system analysis tasks to',...
'the models entered.',' ',...
'One may select the {\itDesign} menu to design controller to the system using',...
'different design tools.',' ',...
'{\bfColor Conventions on Graphs}',...
'In system analysis, if two curves are plotted, then the original model is',...
'represented by green color, while the compensated in blue color.',' ',' ',' ',...
'Good luck and enjoy using CtrlLAB.');
case 0,
hlp_Title='Introduction to CtrlLAB';
hlp_Contents=str2mat(...
'CtrlLAB^\copyright is a series of MATLAB functions which provides graphical',...
'interface to perform feedback system analysis and design tasks.',' ',...
'The facilities provided by CtrlLAB are:',...
' a) model entering, including SIMULINK modeling',...
' b) model display',...
' c) system state space realisation',...
' d) model reduction using different algorithms',...
' e) system analysis in frequency, complex and time domain',...
' f) graphical display and figure editing and manipulation',...
' g) a matrix displayer and editor',...
' h) PID tuning and displaying facilities',...
' i) a great many controller design procedures are implemented',' ',...
'{\bfCopyright declearations}',...
' {\bf CtrlLAB can be distributed freely in this unmodified package for }',...
' {\bf noncommercial use.}',' ',...
'Please refer to Readme.txt file for more detailed information of CtrlLAB.',...
'Theoratical details can be found in ',...
'{\bfDingyu Xue} and {\bfDerek Atherton}, {\itFeedback Control Systems Analysis }',...
'{\itand Design using MATLAB}. (Internal Lecture Notes, with the PostScript',...
'version of the Contents attached in the package)');
case 1,
hlp_Title='Transfer Function Input';
hlp_Contents=str2mat(...
'In CtrlLAB, transfer functions can be entered by numerator and denominator',...
'polynomials in one of the two ways:',' ',...
'1) {\bf The MATLAB arrays:}',...
' a). A transfer function in the form of s^3+4s^2+3s+1 can be entered',...
' as [1,4,3,1];',...
' b). complicated polynomials can be entered in MATLAB expressions, ',...
' e.g., the polynomial (s^2+3s+3)^2(s+1)^2 can be entered as',...
' conv(conv(conv([1,3,3],[1,3,3]),[1,1]),[1,1])',' ',...
' The transfer function can be entered in a more concise way, the',...
' use of m\_conv() function in the book. The transfer function in',...
' the previous example can be entered as',' ',...
' m\_conv([1,3,3],[1,3,3],[1,1],[1,1])',' ',...
'2) {\bf The natural way:}',...
' The polynomial can be entered as ''s'' polynomial strings with the',...
' \^ and * signs omitted. It is more flexible. E.g., the polynomial',...
' in case a) above can be entered as s3+4s2+3s+1, with the integer',...
' follows the s-operator indicates the power. And in case b)., the',...
' polynomial can be entered as (s2+3s+3)2(s+1)2.',...
' It should be noted that in this case, one should not use the \^ and ',...
' * signs. Otherwise there will be error message.');
case 2,
hlp_Title='Demonstration Description';
hlp_Contents=str2mat(...
'{\bfDemo Problem: }plant G(s)=1/(s+1)^3, Draw Bode, and Nichols plots, and',...
' design PID controller, also evaluate the closed-loop system step response',' ',...
'{\it Step 1}: model entering',...
' 1). Press G(s) button',...
' 2). fill in transfer functions, i.e. 1 and (s+1)3, respectively in the dialog',...
' box provided',...
' 3). the display is made automatically',' ',...
'Other model formats are also acceptable to CtrlLAB, including ',...
'SIMULINK model!',' ',...);
'{\it Step 2}: Bode diagram',...
' 1). Select Analysis/Bode diagram menu item',...
' 2). the Bode diagram of the plant is displayed in a new window.',' ',...
'{\it Step 3}: Nichols chart',...
' 1). Select Analysis/Nichols chart menu item',...
' 2). the Nichols chart of the plant is displayed in a new window.',' ',...
'{\it Step 4}: PID controller design',...
' 1). Select Design/PID controllers/One-shot design/Ziegler-Nichols',...
' 2). the PID controller can be displayed in a new window.',...
' 3). The step response of the closed-loop system can be drawn');
case 3,
hlp_Title='What''s New in CtrlLAB 3.0';
hlp_Contents=str2mat('CtrlLAB 3.0 is rewritten in MATLAB 5.1 and the GUI is implemented',...
'in MATLAB functions rather than the MATLAB scripts in the earlier',...
'versions. This made the system more reliable than before.',' ',...
'CtrlLAB 3.0 is no longer available in MATLAB 4.2 due to the incompatible ',...
'data structure.',' ',...
'The following are the new facilities in CtrlLAB 3.0:',' ',...
' 1) MATLAB workspace is clean now, since all the intermidiate variables',...
' are passed by GUI itself, rather than by variables in workspace.',...
' 2) Robustness of the program is increased, where the new facilities in',...
' MATLAB 5 and over are extensively used.',...
' 3) GUI is slightly changed from CtrlLAB 2.0 where more powerful graphs',...
' processing, system display, analysis and design can be more easily',...
' accessed by the users.',...
' 4) SIMULINK modelling part is rewritten such that new block facilities,',...
' such as saturation actuator, ZOH, measurement noise can be included ',...
' in the system.',...
' 5) Program structure is more versitile now and it can easily be further',...
' extended to incoorperate with new facilities.');
case 4,
hlp_Title='About Model Reduction';
hlp_Contents=str2mat(...
'Several model reduction algorithms to SISO continuous models are',...
'implemented in CtrlLAB. The currently available ones are included',...
'in the {\itselect a method} list box. ',' ',...
'Once a method is selected, one should fill in also the expected order',...
'for reduction. Sometimes both the orders of numerator and denominator',...
'should be entered. One can also specify whether a delay term is ',...
'expected in the reduced model.',' ',...
'When the {\itoptimal reduction} method is selected, the user should also',...
'enter the input type and the weightings for the optimisation criterion.',' ',...
'The optimisation criterion is defined as',...
' J=\int_0^\infty f^2(t) e^2(t) dt',...
'where f(t)=1 for ISE, f(t)=t for ITSE, f(t)=e^{-c_4t} for exponential',' ',...
'The input type is defined as',...
' u(t)=c_1 + c_2 e^{-c_3 t}',...
'and one should enter the C vector to specofy the values of c_1,c_2,c_3,c_4. The',...
'variable c_5 is a reserved variable that is not currently used.');
case 5,
hlp_Title='About File Menu';
hlp_Contents=str2mat(...
'{\bfFile} menu in the CtrlLAB main window is provided to allow the user to ',...
'save and load internal models to and from files. The menu is useful in the ',...
'workspace management for CtrlLAB. The submenus are summarised below:',' ',...
' {\bf\itNew} menu item: to allow the user to clear unwanted wariables in the ',...
' workspace and start with a new model.',' ',...
' {\it\bfOpen} menu item: to allow the user to load a previousl saved data file ',...
' to restore models.',' ',...
' {\itSave} and {\itSave As} menu items: This two menu items allows the user to ',...
' save the system models under study to data files. Like other windows ',...
' applications, the Save as menu saves the models to a new data file.',...
' {\bf\itExit} menu item: will allow the user to quit CtrlLAB, and close other ',...
' related windows. Also the model unsaved will be saved.');
case 6,
hlp_Title='About Model Menu';
hlp_Contents=str2mat(...
'{\bfModel} menu in the CtrlLAB main window is provided to allow the user to ',...
'select different input and display types for the system models. Also ',...
'reductions to the existing plant model is allowed.',' ',...
' {\bfModel Select} menu item: to allow the user to select different part of the',...
' feedback system structure, such as the plant model, the controller ',...
' model, the feedback model, and possibly the delay model.',' ',...
' {\itModel Type} menu item: to allow the user to select a type for model input.',...
' Linear models can be entered by trafsfer function, state space or pole-',...
' zero-gain models. Linear or nonlinear model can be entered using ',...
' the SIMULINK program.',' ',...
' {\itDisplay Type} menu items: This menu item allows the user to select a model',...
' type for display. The transfer function, state space model, pole-zero-',...
' gain model and the factorised transfer function models are allowed. ',' ',...
' {\itRealisation} menu item: allows the user to get the state space model by',...
' different known realisations, such as the controllable canonical, etc.',' ',...
' {\bfReduction} menu item: The model reduction to the plant model can be ',...
' obtained by using this menu. A dialog box will be given.',' ',...
' Other menu items: The model can be displayed/editted by {\bfShow} and',...
' {\bfModify} menu items. The model library in SIMULINK can be',...
' displayed using the {\bfShow Model Library} menu item.');
case 7,
hlp_Title='System Analysis Facilities';
hlp_Contents=str2mat(...
'{\bfAnalysis} menu in the CtrlLAB main window is provided to allow the user ',...
'to perform different analysis tasks for the model given. The Bode diagram, ',...
'Nyquist plot, Nichols chart, inverse Nyquist plot, step/impulse responses, ',...
'root locus for the system with different combinations (such as open-loop and ',...
'closed-loop, compensated and uncompensated etc) using the relavent menu ',...
'items, and the curves will be displayed in relavent windows.',' ',...
'The stability marginss, analytcal solutions, and gain phase margins of the ',...
'given system model can also be obtained and displayed in the Information ',...
'Display Window by using different menu items.',' ',...
'The state space representation of the plant model can be displayed in the ',...
'Matrix Processor Window when the {\itCall Matrix Processor} menu item is ',...
'selected, where the system can be analysed in the relevent GUI.',' ',...
'The {\itLoop Specs and Signals} menu is useful for the user to specify which of ',...
'the system model is to be analyzed. One may select different specifications ',...
'from it. It is worth mentioning that the signal selections are mainly for time',...
'response analysis, while the transfer function specifications are mainly for ',...
'frequency domain and complex domain.');
case 8,
hlp_Title='System Design Facilities';
hlp_Contents=str2mat(...
'{\bfDesign} menu in the CtrlLAB main window is provided to allow the user ',...
'to design compensators for the given plant model, using different design',...
'techniques. Currently three classes of design techniques are available.',' ',...
'{\bfClassical Compensation} menu item: Allows the design using the lead-',...
' lag, LQR, pole placement, and model following methods',' ',...
'{\bfPID Control} menu item: Allows to design a PID controller using ',...
' different algorithms and different structures. ',...
'{\bfRobust Control} menu item: Allows one to design a robust controller,',...
' such as the LQG, LQG/LTR, H_2, H_\infty and the optimal H_\infty controller.',' ',...
'More information on each of the controller can be obtained in the Help',...
'information in the relevent design dialog boxes.');
case 9,
hlp_Title='About Graphics Window';
hlp_Contents=str2mat(...
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -