Skip to content

Update simulink to include LPF, PLL, and observer#140

Open
noguchi-takahiro wants to merge 30 commits intoadd-enc-anirudhfrom
user/noguchi-takahiro/update-simulink
Open

Update simulink to include LPF, PLL, and observer#140
noguchi-takahiro wants to merge 30 commits intoadd-enc-anirudhfrom
user/noguchi-takahiro/update-simulink

Conversation

@noguchi-takahiro
Copy link
Contributor

@noguchi-takahiro noguchi-takahiro commented Jun 7, 2025

This PR update simulink to include LPF, PLL, and observer, and update the Encoder Calibration article, especially Computing Speed from Position section to close #147.

@noguchi-takahiro
Copy link
Contributor Author

noguchi-takahiro commented Jun 8, 2025

I have tried to simulate speed control using LPF, PLL, and Observer.

Top level of Simulink

image

There are three types of speed controller with 1) LPF, 2) PLL, and 3) Observer.

Here are what each model looks like (see below). These controllers have the same speed controller, but only differences are how to compute the rotational speed $\Omega$ based on the angle feedback $\theta_m$. Note that these models are coming from BP4 control model.

LPF

image

PLL

image

Observer

image

Notice that there is feedforward torque here.

Speed control results:

plot_results

The speed controller is tuned with 100 Hz bandwidth. Interestingly, only observer approach works well without overshoots, while all controllers have the same bandwidth. This is likely due to the phase delay of low-pass filter and PLL.

For now I am questioning if it would be useful to include this Simulink model? If so, how to organize them? Like maybe it would be helpful when the repo has three types of Reference model for LPF, PLL, and Observer, so that the AMDC users can easily switch them to use in practice?

Any details are available in this m file. To run this, simply run it.

@noguchi-takahiro
Copy link
Contributor Author

@elsevers @Daehoon-Sung regarding the organization of the difference-equation-approach section, especially when we think about adding the PLL, we can just add that section as follows:

## Difference Equation Approach
### Low-pass filter
### Observer

## PLL-based Approach

This is because the both the low-pass filter and observer approaches are implemented based on that the angular speed $\Omega_{raw}$ is computed first using this:
image

These methods then filter or refine that initial signal $\Omega_{raw}$.

On the other hand, the PLL approach aims to align the phase of the estimated signal with the one of the measured "angle" $\theta_m$. This means that the PLL does not necessarily use $\Omega_{raw}$ directly, but it detects the angle error, and as a result, it is able to compute the speed indirectly. Interestingly, while the PLL is configured as the closed loop between $\theta_{in}$ and $\theta_{out}$, we only use the $\Omega_{raw}$, which is located the middle of this loop as shown in the image below:

image

@noguchi-takahiro noguchi-takahiro marked this pull request as ready for review November 26, 2025 17:58
@noguchi-takahiro
Copy link
Contributor Author

@mhmokhtarabadi @knvprasad-dr @Daehoon-Sung I think the Simulink model is ready for your review. Could you review them?

@noguchi-takahiro
Copy link
Contributor Author

@mhmokhtarabadi @knvprasad-dr I wonder if you have had a chance to review this PR? The goal here is to to incorporate/reflect your knowledge from the work with Tim, and make sure the Simulink model we are adding here is accurately modeled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants