Clear Filters
Clear Filters

Error due to multiple causes in implementing optimization algorithm (PSO)

5 views (last 30 days)
I am currently working on a research project involving particle swarm optimization (PSO) applied to a Simulink model for control system optimization. However, I am encountering an error that I am unable to resolve on my own. Given your expertise and experience in the field, I was hoping you could provide some guidance or insights to help me overcome this issue.
I'm dynamically updating the gains values for outer speed control loop of pmsm field oriented control. the optimisation algorithm works really well in cascaded linear control design and optimise PI gains of speed controller by minimizing the error(ITAE).
But model predictive control as a current loop and PI control as a speed loop and the optimisation algorithm doesnt works and gave the error under same condition employed for cascaded linear control design.
the error message is attached for better undersanding of the problem and any guidance in this regards
Error using pso_mpc_nn>fobj
Error due to multiple causes.
Error in pso_mpc_nn (line 37)
swarm{particle,errCol} = fobj(); - Show complete stack trace
Caused by:
Error using pso>fobj
Error evaluating parameter 'P' in 'SPMSM/PSO1' - Show complete stack trace
Error using pso>fobj
Undefined variable 'swarm'. - Show complete stack trace
Error using pso>fobj
Error evaluating parameter 'I' in 'SPMSM/PSO1' - Show complete stack trace
Error using pso>fobj
Undefined variable 'swarm'. - Show complete stack trace
the evaluating parameters are carefully assigned in simulink pso1 block but still it show the error undefined variables. swar = {} ;i s also define at the start of the code

Answers (0)

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!