Answered
How to use model predictive control and quadprog() in MicroAutobox III
Hi, You can use quadprog for simulation and code generation as a solver in Model Predictive Control Toolbox as of R2021b releas...

1 year ago | 0

Answered
Model predictive control (MPC) for MIMO system on real hardware in simulink
Unfortunately, you cannot use Simulink models as prediction models for MPC design. The alternative would be to use data-driven m...

1 year ago | 0

Answered
Adaptive model predictive controller
Have you seen this example?

1 year ago | 0

Answered
Independently working multiple reinforcement learning agents
Centralized learning makes learning and exploration more efficient because the agents share things like experiences. If agents p...

1 year ago | 0

| accepted

Answered
Problem with Using codegen commands to generate C++ code on NLMPC Code Generation Tutorial
You did not specify what kind of error you were seeing? In my case, doing the following worked: func = 'nlmpcmoveCodeGeneration...

1 year ago | 0

Answered
RL agent does not learn properly
Some comments: 1) 150 episodes is really not much, you need to let the training continue for a bit longer 2) There is no guara...

1 year ago | 0

| accepted

Answered
Action of the RL agents actions change when deployed in a different enviornment
A couple of suggestions/comments: 1) You mentioned env1 and env2 are different - why are you expecting to see the same results?...

1 year ago | 0

Answered
How to specify a nonlinear mpc controller for continuous time delay differential equation state function?
You can basically add states to help model the delays. So your new discretized state vector would be [x(k) y(k) x(k-1) y(k-1) .....

1 year ago | 1

| accepted

Answered
Plotting states while doing RL training
We recently added a mechanism that allows you to log any information you find helpful during training. Please take a look at thi...

1 year ago | 0

| accepted

Answered
Inquiry about Neural Network Structure for Lane Keeping Assist Example
For this example, we did not rely on any papers/external sources, the development team put together this architecture when they ...

1 year ago | 0

| accepted

Answered
Although I adjusted the Noise Options DDPG actions are always equal to the maximum and minimum value.
At first glance I don't see anything wrong. A couple of suggestions: 1) Try reducing the noise variance further, until you see ...

1 year ago | 0

| accepted

Answered
How to log signal data from simulink to matlab with higher time interval to avoid high data storage?
If you are using R2022b, please take a look at this page. We recently added enhanced logging capabilities in Reinforcement Learn...

1 year ago | 1

Answered
How to input action in reinforcement learning template environment?
Easiest thing you can do is add a break point and display what "action" variable is. It's obviously not a cell array so you cann...

1 year ago | 0

| accepted

Answered
How to set the state with different variables in properties?
Hi Yang, We have an example in Reinforcement Learning Toolbox that does training based on nonhomogeneous observations, and spec...

1 year ago | 0

| accepted

Answered
Receiving only one joint angle instead of a cycle of values necessary for walking during simulation?
Hello, There are several open questions here: 1) If you want to use imitation learning, you need to have input output data. In...

1 year ago | 1

| accepted

Answered
Terminal Weights to nlmpc
For nonlinear mpc, the easiest way to do that is to use the multistage formulation and block. Then you can set constraints/cost ...

1 year ago | 0

| accepted

Answered
How to put vector as a element in rlNumericSpec?
You could do something along the lines of: ObservationInfo(1) = rlNumericSpec([1 1]); ObservationInfo(1).Name = 'scalar'; Obs...

1 year ago | 0

| accepted

Answered
Discretisation of a non-linear LTI system
If you have the dynamics in symbolic form, you need to turn it into a form that can be directly consumed by Model Predictive Con...

2 years ago | 0

| accepted

Answered
How to import single input and three output data (of simulink model) stored in workspace, using system identification app (present in apps option) in matlab ?
Have you looked at this example which trains a state space model and then uses it for MPC design?

2 years ago | 0

Answered
How to save multiple trained RL Agents?
You can really do whatever makes sense to you. Either save them separately or in the same mat file as follows: save('Agents.mat...

2 years ago | 0

Answered
I'm getting the following error while doing the state update in mpc
Looks like the error is quite descriptive here, please check the dimensions of A, x, u, and B1 maybe by using a break point to s...

2 years ago | 0

| accepted

Answered
How to optimize a parameter using Nonlinear model predictive controller
Looks like you are referring to parameters defined inside the prediction model/state function of the MPC controller. You can mak...

2 years ago | 0

Answered
Problems importing Farama Gymnasiums (previously Open AI gym) continuous environments in MATLAB to use RL toolbox
Hi Alberto, In the post you are mentioning, I recommended a 3rd party tool to use OpenAI Gym with Reinforcement Learning Toolbo...

2 years ago | 0

| accepted

Answered
how to choose the alternate cost function in MPC command line window? and can we know which cost function MPC block is considering?
By default, MPC controller will use the standard cost. If you want to use the alternate cost, you can see how to do it in this e...

2 years ago | 0

| accepted

Answered
Can we equate or un-equate the two MV's of the MPC controller in command line?
Hello, A couple of points first: 1) I am assuming your MVs are continuous (if they are discrete, what you are asking is not su...

2 years ago | 0

| accepted

Answered
Reinforcement Learning agent converges to a suboptimal policy
Hello, In your question you mention a graph but it has not been attached? It sounds like the agent you trained has converged t...

2 years ago | 1

Answered
reinforcement learning line tracer with Simulink
The closest I can think of are these examples in Reinforcement Learning Toolbox: https://www.mathworks.com/help/reinforcement-l...

2 years ago | 0

| accepted

Answered
reinforcement learning train-progress
Hi, If you have saved the training results, you can use this function to recreate the plot.

2 years ago | 0

| accepted

Answered
How do I randomize the value in a constant block for a local reset function for RL training
The num2str([10 10 10]) evaluates to '10 10 10' without brackets which is what causes the problem. Instead, just put '[10 10 10]...

2 years ago | 0

| accepted

Answered
Example: Train DDPG Agent to Swing Up and Balance Pendulum: Where are mechanical constants initialized ?
I am assuming the question is about this example. Inside the pendulum subsystem, we are modeling the equation (I + ml^2) theta_...

2 years ago | 1

| accepted

Load more