Clear Filters
Clear Filters

Problem using connect and AnalysisPoints_

1 view (last 30 days)
Lidia Pérez Treus
Lidia Pérez Treus on 25 Aug 2022
Answered: Sanchari on 29 Dec 2023
Hi,
I am creating a blocks system to control the position of a UAV, where:
  • R_y and R_v are my PI, PID tuned controllers
  • F_phi is the control sensitivity function from a previous system ('CL_att') that controls UAV attitude. In these previous system I connected some points and defined some analysis points. Then, obtained F_phi using getIOTransfer(CL_att,'\phi_0','\phi');
  • W_1 and W_2 are weight functions to tune the controllers with hinfstruct
  • block_v and block_y are the two last tf's blocks
I connected all blocks and defined the Analysis Points I am interested in:
CL_pos0 = connect(R_y, R_v, F_att, block_v, block_y, W_1, W_2, SumOuter_pos,'y_0',{'z_1_pos','z_2_pos','y'},{'e_y','y','\phi_0'});
However I am getting an error: "Error using DynamicSystem/connect The block with name "AnalysisPoints_" has two or more conflicting definitions". If instead I delete the analysis points input, compute CL_pos0 and then find the existing analysis points, I get other three analysis points that I used for F_att previously in my code.
What can be the error and how can I add new analysis points for this system?

Answers (1)

Sanchari
Sanchari on 29 Dec 2023
Hello Lidia,
I understand that you are facing an error in using connect and AnalysisPoints. The error you're encountering suggests there is a conflict with the naming or usage of analysis points in your system. Analysis points are used to access specific signals within a control system interconnection for analysis or design, such as loop shaping or controller synthesis. When you use the same name for different analysis points or incorrectly specify the connections, MATLAB can throw an error like the one you're seeing.
You can follow the steps below to resolve the error:
  1. Check for duplicate names: Ensure that you have not used the same name for multiple analysis points. Each analysis point should have a unique identifier.
  2. Verify AnalysisPoint definitions: Make sure that the analysis points are defined correctly in your system. When you extracted ‘F_phi’ using ‘getIOTransfer(CL_att, '\phi_0', '\phi')’, the analysis points within ‘CL_att’ were likely included in the resulting transfer function ‘F_phi’. If you then try to define new analysis points with the same names when creating ‘CL_pos0’, this could cause the conflict.
  3. Create new AnalysisPoints: If you need to define new analysis points for ‘CL_pos0’, ensure that they have unique names that do not overlap with the existing ones within ‘F_phi’.
  4. Remove redundant Analysis Points: If ‘F_phi’ already contains the analysis points you need, you do not have to redefine them when creating ‘CL_pos0’. You can simply use the existing points.
  5. Use ‘linio’ Objects: If you are using ‘linio’ objects to specify analysis points, ensure that you are creating and connecting them properly. You can create ‘linio’ objects with unique names before calling connect.
  6. Check the ‘connect’ function: Ensure that the ‘connect’ function call is correctly specifying the block connections and analysis points. The syntax should match the following pattern:
CL = connect(sys1, sys2, ..., sysN, inputs, outputs, analysispoints);
Here, ‘inputs’, ‘outputs’, and ‘analysispoints’ are cell arrays of strings that specify the names of the input, output, and analysis point signals, respectively.
Hope this information is helpful to you!

Community Treasure Hunt

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

Start Hunting!