onder

50 Reputation

8 Badges

14 years, 174 days

MaplePrimes Activity


These are replies submitted by onder

@Joe Riel Sorry Joe, I attached the wrong file. The problem that I currently face is when I re-run the simulation, I have different simulation results. I assigned all the important initial values for the modelica blocks and this reduced the amount of the changes in the results for each simulation. However, sometimes differences between each simulation is still significant. I suppose this is due to simulation settings 'adaptive=true'. I changed it to false and assigned 0.01 time step, then it gives a warning which tells that the maximum number of events (100) has been reached and gives the results up to 1.2s. Please advise me on this issue. Here is the file test1.msim. Thanks for your help...

Hi,

If you specify your problem to generate random data, if I know, I might help you....

Hi,

If you specify your problem to generate random data, if I know, I might help you....

@Joe Riel Hi Joe,

The artificial intelligence algorithm consisting of multibody system, modelica blocks and a couple of maple blocks is now working. The problem is now whenever I re-run the simulation the results are changing. I suppose this is because of the initial values which are computed at each time. Initial value selection especially for the criticParamUpdate(Wc) and actorParamUpdate(Wa) are important. How can I fixed this problem? When I run the simulation each time I see the message "Computing initial values..." message in the console pane. I assigned initial values for each block in the inspector tab, but this did not solve the problem. Here is the file test1_06msim.msim.

Please let me know your advise...Thanks for your help....

@Joe Riel Hi Joe,

The artificial intelligence algorithm consisting of multibody system, modelica blocks and a couple of maple blocks is now working. The problem is now whenever I re-run the simulation the results are changing. I suppose this is because of the initial values which are computed at each time. Initial value selection especially for the criticParamUpdate(Wc) and actorParamUpdate(Wa) are important. How can I fixed this problem? When I run the simulation each time I see the message "Computing initial values..." message in the console pane. I assigned initial values for each block in the inspector tab, but this did not solve the problem. Here is the file test1_06msim.msim.

Please let me know your advise...Thanks for your help....

@Joe Riel Thanks Joe. I think the problem is with my computer. In the morning the simulation was faster and now it is ok. The simulation is working now without giving any error test1.msim. Many thanks for your support.

Now I need to manipulate the parameters to learn the appropriate artificial intelligence action.  Is there any way to define parameters globally and call them in any modelica blocks? For example, there is an "Integer sn=10" used in almost every block and if I need to change it, then I have to modify every block. However, if there is such a property, then I can just change globally assigned sn to for instance "sn=15".

Thanks

@Joe Riel Thanks Joe. I think the problem is with my computer. In the morning the simulation was faster and now it is ok. The simulation is working now without giving any error test1.msim. Many thanks for your support.

Now I need to manipulate the parameters to learn the appropriate artificial intelligence action.  Is there any way to define parameters globally and call them in any modelica blocks? For example, there is an "Integer sn=10" used in almost every block and if I need to change it, then I have to modify every block. However, if there is such a property, then I can just change globally assigned sn to for instance "sn=15".

Thanks

@Joe Riel Finally tested each block and combined them by just ignoring the measurements coming from the pendulum. It worked, but the simualtion is too slow. It took 9 minutes for the simulation where the end time was 0.1s. (test1.msim). Could you advise me about the reason for this too slow simulation process? It also messages that it is removing some of the variables and as we use the previous vector values it gives warning "Input system does not contain criticParamPrevoious1.WcDiscrete....Do you think we should ignore this warning?

Thanks for your help...

@Joe Riel Finally tested each block and combined them by just ignoring the measurements coming from the pendulum. It worked, but the simualtion is too slow. It took 9 minutes for the simulation where the end time was 0.1s. (test1.msim). Could you advise me about the reason for this too slow simulation process? It also messages that it is removing some of the variables and as we use the previous vector values it gives warning "Input system does not contain criticParamPrevoious1.WcDiscrete....Do you think we should ignore this warning?

Thanks for your help...

@Joe Riel Hi Joe,

I have started to test blocks one by one to find the solution for the previous error "System is inconsistent". When I changed the code from

  c=[theta_r[i]; theta_p[j]];
  bFunc[(i-1)*size(theta_r,1)+j,1]=scalar(exp(-(1.0./s).^2*([phi;omega]-c);

to

  bFunc[(i-1)*size(theta_r,1)+j,1]=scalar(exp(-(1.0./s).^2*([phi;omega]-[theta_r[i];theta_p[j]);

Then I have the message "System is underdetermined". (test3.msim ) However, when I removed the input from the pendulum to the basisFunction, this message disappeared. (Instead of the measurements coming from the pendulum, I assigned constants values). It worked, (test2.msim) (The simulation is too slow). What could cause this? What do I need to do to get rid of this problem?

Thanks

@Joe Riel Hi Joe,

I have started to test blocks one by one to find the solution for the previous error "System is inconsistent". When I changed the code from

  c=[theta_r[i]; theta_p[j]];
  bFunc[(i-1)*size(theta_r,1)+j,1]=scalar(exp(-(1.0./s).^2*([phi;omega]-c);

to

  bFunc[(i-1)*size(theta_r,1)+j,1]=scalar(exp(-(1.0./s).^2*([phi;omega]-[theta_r[i];theta_p[j]);

Then I have the message "System is underdetermined". (test3.msim ) However, when I removed the input from the pendulum to the basisFunction, this message disappeared. (Instead of the measurements coming from the pendulum, I assigned constants values). It worked, (test2.msim) (The simulation is too slow). What could cause this? What do I need to do to get rid of this problem?

Thanks

@Joe Riel  Definitely it is dificult to specify the source of the error for this case. I spent the whole day but still I have the same error, will continue tomorrow. I tried to disable the basisFunction block, but this time it gives an error telling there is no basisFunction. I think for this case you mean that we can disable this block but we must provide a vector bPen which is the output of the basisFunction as the input for the rest of the blocks; hence we will be able to reach the source of the error.

I assigned 0.01s for the pre() functions and ZOH as the time interval and changed the simulation adaptive false by choosing 0.01s time interval. Do you think this can cause the proble?

OR for example r0[1,1] is determined in a block and assigned as an output of the block; however, in another block it is assigned as an input in the form of just r0 without specifying the size of r0. Do you think this is a source of error?

Sorry, again I asked lot of questions... Thanks....

@Joe Riel  Definitely it is dificult to specify the source of the error for this case. I spent the whole day but still I have the same error, will continue tomorrow. I tried to disable the basisFunction block, but this time it gives an error telling there is no basisFunction. I think for this case you mean that we can disable this block but we must provide a vector bPen which is the output of the basisFunction as the input for the rest of the blocks; hence we will be able to reach the source of the error.

I assigned 0.01s for the pre() functions and ZOH as the time interval and changed the simulation adaptive false by choosing 0.01s time interval. Do you think this can cause the proble?

OR for example r0[1,1] is determined in a block and assigned as an output of the block; however, in another block it is assigned as an input in the form of just r0 without specifying the size of r0. Do you think this is a source of error?

Sorry, again I asked lot of questions... Thanks....

I have managed to use "flatten" in Maple and also generated Modelica Custom Component for that function. Thanks Joe, I really appreciate for your help. I noticed that with MapleSim5 when I pressed the button "Generate Component from Source", it does not give any error, it seems it works fine but it does not generate component. However, MapleSim4.5 geneartes the component. Just I wanted to you know this....

As you know the output of this function is a vector. I need to use the previous vector (at time t-1) and the current vector  for the further steps of this algorithm. How can I use this previously determined vector? There is one function pre(), but it is for a scalar value. Do you have any suggestions for this?

Thanks

I have managed to use "flatten" in Maple and also generated Modelica Custom Component for that function. Thanks Joe, I really appreciate for your help. I noticed that with MapleSim5 when I pressed the button "Generate Component from Source", it does not give any error, it seems it works fine but it does not generate component. However, MapleSim4.5 geneartes the component. Just I wanted to you know this....

As you know the output of this function is a vector. I need to use the previous vector (at time t-1) and the current vector  for the further steps of this algorithm. How can I use this previously determined vector? There is one function pre(), but it is for a scalar value. Do you have any suggestions for this?

Thanks

1 2 3 Page 2 of 3