Fuzzy control problem:(1)input 2 expects a value in range [-1.5 1.5], but has a value of 4.36559e+24;

45 visualizzazioni (ultimi 30 giorni)
In 'EV_Thermal_Management_wendukongzhi_zhileng/Controls/Compressor Control/ÿÿÿÿ/Fuzzy Logic
Controller', input 2 expects a value in range [-1.5 1.5], but has a value of 4.36559e+24.
取消组合 1025 相似
显示堆栈跟踪
组件:Simulink | 类别:Model 警告
In 'EV_Thermal_Management_wendukongzhi_zhileng/Controls/Compressor Control/ÿÿÿÿ/Fuzzy Logic
Controller', no rules fired for Output 1. Defuzzified output value set to its mean range value 0.
取消组合 3075 相似
  7 Commenti
Ke
Ke il 15 Mag 2024
Thank you very much for your answer, I tried to experiment with the method you provided. Can you share your model with me?
Ke
Ke il 15 Mag 2024
Hello, I tried it and found that it still doesn't seem to be ideal, I can't get the rate of change without using the Derivative block.

Accedi per commentare.

Risposta accettata

Sam Chak
Sam Chak il 15 Mag 2024
Hi @柯
If there is no other way to directly measure the time derivative signal from the system, the proposed configuration with a Pre-filter at the Setpoint and a Filtered Derivative transfer function can be used to replace the original Derivative block. This configuration should effectively address the issue of derivative kick caused by setpoint jumps.
In Scope 1, you can see that the maximum value of dedt (the derivative of the error) is less than 1.5, which falls within the range of the fuzzy input 'ec'. This indicates that the proposed configuration successfully manages the derivative kick issue.
Scope 2 demonstrates how the fuzzy PID gains vary over time, maintaining non-negative values throughout the simulation. To achieve this, a small trick using the 'Abs' block is employed. Please note that in your original system, you should remove any additional blocks related to gain adjustment. Only the Pre-filter and the Filtered Derivative are necessary.
Lastly, Scope 3 illustrates the stability achieved by the Double Integrator system. A Simulink model is also attached for your reference and the original FIS file is unchanged.
Scope 1
Scope 2
Scope 3
  4 Commenti
Ke
Ke il 17 Mag 2024
Spostato: Sam Chak il 17 Mag 2024
Hello, I found that the model you built does not seem to initialize the PID parameters, and directly input the output of the fuzzy rules into the PID controller as the values of KP, KI, KD, will this have an impact?
2. In addition, you mentioned that my membership function should be 13, I don't understand this too much, and the output membership function I set is also 7 triangle membership functions with the input.
3. Regarding the unlimited output, I want to control the speed of my compressor to ensure that his speed is within a reasonable range and cannot exceed the maximum range.
Sam Chak
Sam Chak il 17 Mag 2024
Hi @柯
Thanks for your feedback. The reason I modified the PID structure is because you didn't supply the Compressor model for me to test. So, I created the simplest unstable model, a Double Integrator system, to run the PID controller.
Next, I needed to rule out the possibility that the Simulink error was caused by the fuzzy system you originally designed. Since I cannot alter anything in your fuzzy system, I can only modify the mechanisms outside of it to produce PID gain values that stabilize the Double Integrator system.
With the Double Integrator now stable, the system output signal fed back to the fuzzy system won't blow up. This allowed me to focus on fixing the "Derivative Kick" issue, and I proposed using the Prefilter (pastel red block) and the Filtered Derivative (pastel blue block). After testing the Double Integrator system again, the "Derivative Kick" issue was resolved.
That's why I mentioned that only the Prefilter and the Filtered Derivative are necessary, and the rest should remain the same as in the original Simulink file "mhkz.slx". Please let me know if the implementation of the Prefilter and the Filtered Derivative has indeed fixed the "Derivative Kick" issue for your system.

Accedi per commentare.

Più risposte (1)

Sam Chak
Sam Chak il 17 Mag 2024
Hi @柯
This following issue does not affect the original "derivative kick" problem described in this thread. So, it should be treated separately.
On the reason why the number of output membership functions (MFs) should be ideally 13, first, you need to review the If–Then rulebase (see Fig. 1). Look at the yellow boxes - you'll see that many of the output MFs are reused throughout the 49 rules. This causes the Fuzzy Kp surface in Fig. 2 to look a little strange.
Going back to the rulebase, since there are 2 inputs (e and ec) and each input has 7 MFs, there are 7 rule sets of 7 rules (see the 1st rule set in the orange box). However, there were only 4 output MFs in your original Kp design (see Fig. 3). So, for each rule set, you only have 4 output MFs to fill up the 7 rules, and thus, reusing some MFs is inevitable, making the fuzzy rules inflexible and less unique.
To address this issue, you can add another 3 Positive MFs (mf8, mf9, mf10) on top of the existing 4 output MFs (see Fig. 4). Now there will be enough 7 distinct MFs for the 7 rules in the first rule set. If you add another 3 Negative MFs (mf11, mf12, mf13) on the Negative side for Kp, Ki and Kd, there are just enough MFs for the 7 rule sets (all 49 rules). That's why I mentioned ideally there should be "13 MFs for each output"!
Figure 1: Fuzzy If–Then rulebase.
Figure 2: Fuzzy Kp surface
Figure 3: Original Fuzzy Kp output membership functions
Figure 4: Modified Fuzzy Kp output MFs (positive side for demo only)
  36 Commenti
Sam Chak
Sam Chak il 28 Giu 2024
Hi @柯
I would suggest that you start by taking the self-paced Optimization Onramp course, which is available at the following link:
This course should help you familiarize yourself with the basics of solving optimization problems in MATLAB. It covers topics such as defining optimization variables, implementing objective functions, and solving both unconstrained and constrained optimization problems.
If you encounter any technical issues in your optimization problem with Simulink, I would recommend posting a new, focused question. This will help prevent the current discussion on the fuzzy control topic from becoming an overly lengthy thread.

Accedi per commentare.

Categorie

Scopri di più su Fuzzy Logic in Simulink in Help Center e File Exchange

Prodotti


Release

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by