Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


andyer last won the day on July 27

andyer had the most liked content!

About andyer

  • Rank

Profile Information

  • Are you University user?

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi João, Nice! FYI, if you are looking for some more ideas/examples to talk about how you might use Activate, MotionSolve and possibly other Altair tools in your team I had written this paper a few years back that discusses a workflow based on an active suspension example, using quarter-car and full-vehicle models in both Activate and MotionSolve. You can also find more videos about these topics in our Learning Center, e.g: https://www.altair.com/learning-center/ Hope this helps. Let us know if you want to more about any of these topics in particular. Best, Andy mechatranics_model_based_development.pdf
  2. Note that for Flux users who may not be so familiar with Activate, here's some more information about where/how to set the solver and documentation about fixed vs. variable step and more. To set the solver, hover your mouse cursor to the lower right by the play + stop button area to reveal the solver settings dialog: Note that LSODA is the default solver, this is a variable-step solver and generally runs fast and accurate for a large range of models. You can use the pull down menu to select other solvers (like different variable and fixed step solvers): You can find more information about the solvers in the "Extended Definitions for Advanced Users" document under the help (File --> Help --> Help from the menus) - see the "Reference Guides" section: Then within this guide see the "Activate hybrid simulator and its interface with numerical solvers" section. Hope this helps. Best, Andy
  3. Hi Taohid, Is it only the slowdown you see - are you getting the result you expect? Are you using a fixed-step solver or variable-step solver in Activate? Note that using Flux 2019.1 for cosim, there is an issue when a variable-step size integrator is used and may cause spikes/time mismatch when the step is rejected and the time step changes and may also cause a slow down. You could try a fixed step solver like Backward Euler in Activate to avoid this issue. If possible, please download and install Flux and Activate 2020 from https://connect.altair.com, as there were some fixes/updates for Flux+ Activate co-simulation that could possibly help you. IN particular, the issue with variable-step solver has been fixed. If none of this helps, can you also please share the settings you have in the Flux block in Activate and we'll try to help further. You may also make sure you can run one of the example models in the Demo Browser in Activate to make sure everything is setup and working fine on your machine. Best, Andy
  4. Hi Yubuchi-san - 'inf' is short for infinity, for example, from a divide by zero operation. If you are trying to avoid this, you might try to add a small value to the denominator of an expression which gives a small error in the result but avoids the divide by zero (if this applies). How are you seeing this? Best -Andy
  5. Hi xrek, Sorry I missed this - good news however is that the model you seek is attached here I hope this helps. PMSM_FOC_speed_control_PWM_Activate_v2019p3_4Mar2020.zip --> I just updated the model to Activate v2019.3, please install this version to use it If you are interested in PMSM models, you may be interested in this next one, too. This has more advanced modeling features and thus is a bit more complex to first learn but provides a more powerful solution, so I would start with the first one above before moving on to this. The package is too big to upload here, so I have posted it on the Altair FTP server for download: https://ftam1.altair.com/message/UBCjGxNITxBBsuBNFiVghp Vector Control of a PMSM machine - Nissan Leaf-like Example Using Lenord + Bauer Encoder model Highlights: -Speed/Current controller based on optimal currents (MTPA/MTPV) from Altair FluxMotor -Multi-fidelity/extensible modeling for plants - E-motor, Inverter, Position Sensor (Lenord + Bauer Encoder vs Resolver ,etc) * E-motor Look-up Table Generation, Co-simulation with Altair Flux Finite Element ElectroMagnetic Solution for model validation -Parameterized/scripted models for speed sweeps, model variation and exploration Requires Altair Activate v2019.3 or newer. Some more details including videos below: Model Summary Presentation at Altair 2019 ATC - Model-Based Development Symposium https://www.altair.com/resource/model-based-development-2019-global-atc?weight=1 Position Sensor (Encoder/Resolver) Impact on E-motor drive: curb test by Lenord + Bauer (Ulrich Marl) https://www.linkedin.com/feed/update/urn:li:activity:6609446662207225857/ You may use the simplest model ("Park equations") based on constant coefficients for model parameters if this is suitable. You can also find tutorials in Altair Flux regarding how to create the Look-up Table (LuT) models that contain spatial harmonics (e.g., torque ripple effects) and can use co-simulation with Altair Activate + Flux to help validate the models by simulation. Hope this helps. Best, Andy PMSM_FOC_speed_control_PWM_Activate_v2019p3_4Mar2020.zip
  6. Hello Activate enthusiasts! Does Activate support global variables in Diagram contexts (OML)? I see cases where it works (constant sources) and where it doesn't (MathExpressions/MatrixExpressions) from my testing (attached is an example). Just wondering if it is supposed to work or not e.g.,: Define in the Diagram context: global var_a var_b var_c Use var_a, var_b, var_c as parameters in the blocks within the superblocks. I'd like to define a set of variables in a SuperBlock context and then use those same variables in another SuperBlock context to keep the variables encapsulated in the two superblocks and only define the variables in one place to make it easier to use. (For example, define Vehicle data in only one place instead of multiple places). What I would like to do is somewhat analogous to SignalScoping, but for constant (variable) values in the Diagram Context. The workaround is to define the variables one level up, then all children get these variables. But then the variables aren't defined locally to the superblock which I like to keep the data organized. I guess this is fine, just wondering if I might be able to use global variables to make this work. Other ideas are welcome, too Thanks, Andy global_variables_test.scm
  7. Hi Liv, Thanks, I didn't see your response earlier. What I need is a command (if exists) to write create an image after each simulation run so I can programmatically script a series of simulations. Since the model report does something like this today I thought this may already exist and someone might know how to do this. Anyone? Thanks, Andy
  8. Howdy denizens of the Activate community.... I'm wondering if there is a command to save the plots of a single scope as an image. I searched "bde..." and "vss..." commands and see options to save diagram or blocks as images - the most promising option seems to be this: vssHtmlGenerateImageHtml(). Not sure -would this work for saving an image of a single scope? I'm looking for an example for syntax but I haven't found one yet. I search the Activate installation and found a hit but the arguments are not detailed enough to know what is expected. Does anyone have an example for this? FYI: I'm running parameter sweeps and would like to save scopes as images at the end of each run before the next one starts. (overlay is not an option since the next simulation curve covers last one). Thanks! Thanks, Andy
  9. Hi Activate friends, I'm working on a hybrid Activate model that has a lot of discontinuous (activation) events and uses zero crossings. After changing the the Solver settings for zero crossings (Zero-crossing threshold and Zero-crossing time tolerance) I'm able to get a better performance using a variable-step solver (e.g. LSODA). Can someone please define what "auto" means exactly for the zero-crossings? I haven't been able to find a definition for this yet. I would like to loosen these values as they seem to be too strict for my model as the Simulation slows in the middle for a long time before starting again with a variable-step solver. I'd like to know what they are current set to to understand how to vary this. Thanks, Andy
  10. So, it turns out that this command bdeSetBlockStatus () does not work on the current simulation (needs to be fixed). However, a colleague and I (thanks Liv!) were discussing this and he showed me that I can achieve the same behavior by using an Include block on Activate. What you do is to put the superblocks you want to use in your model with Status = off. Then use an include block to select which one you want to use and the Include block will automagically turn the Status = on to the one selected. You can use the commands below to get the name of the model so you can self-reference to the path required in the Include block, e.g.: model_path=bdeGetModelFilePath(bdeGetCurrentModel()); [current_dir,model_name,model_ext]=fileparts(model_path); model_nameTotal=[model_name,model_ext]; %<--- put this as the name of the "Model path" in the Include block so you can self reference in case you change the name of your model Happy simulating, and thanks again, Liv! Cheers, Andy
  11. Hello Activate friends, I'm running through some tests/reviewing the docs to understand what is possible when running Activate in batch with an OML file as the input. (Activate_batch.bat -f file.oml) Thanks, Hai, for the help with my first questions! Attached is an example attached here which is working - I can run on command line and Activate creates a .csv file and I can set/get variables. This is good. For anyone interested to run this, there are comments within the attached .oml and some notes on how to get additional information (see run_interactive_oml_in_batch.oml). This model was created/tested using Activate v2019. I would like to clarify a few features to understand what is supported or not to see if anyone has suggestions/additional information. Questions: 1. It appears that the OML "bde..." commands like are in some of the optimization examples in Chapter 6 of the "Extended Definitions..." documentation are not supported when calling Activate in batch (e.g., Activate_batch.bat -f name.oml, correct? Not sure I need these yet, but was reviewing some of the other examples and initially I tried to use the "bde..." commands unsuccessfully. Are there any other limitations for commands to be aware of? 2. If I would like to set Activate model variables, I can use the Model context to overwrite/reset variables this is done in the example attached here and described in the docs (Extended...Section: 6.4.1). Alternatively, if I would like to set variable instead in Diagram Context, can this be done in batch? Does anyone have an example of this? 3. The "Signal Out" block is used to get variables back from the Activate model to the OML script. Are there any other methods to get variables back, e.g., is it possible to also use the "To Base" block? Thanks, Andy run_interactive_oml_in_batch.oml example_run_Activate_in_batch.scm
  12. Here's a couple of commands to help you get the Full name of blocks: First, select the block you want by clicking on it. Then in the command window, use: blk=bdeGetSelectedBlock(bdeGetCurrentDiagram) bdeGetBlockFullName(blk) Voila!
  13. Looks like I figured it out with some trial and error. If the name of my block is 'SuperBlock', then you can do this with the following commands which deactivate (status = off) or activate, respectively: > bdeSetBlockStatus(bdeGetBlockByFullName('SuperBlock'), 'off') > bdeSetBlockStatus(bdeGetBlockByFullName('SuperBlock'), 'on')
  14. O learned denizens of the Activate forum, Is there a way to set the status of a block (Superblock in this case) programmatically? (e.g. to do this via GUI, right click on a block to select Status --> On/Off). I would like to control the topology of my model via some scripting if possible and wondering if I can do this by controlling the status (or if you have another suggestion I'm open to it, too). Cheers, Andy
  15. Hi everyone, I have a tip I think might be helpful to others as it is helpful to me to load external data files in my Activate models without having to worry about the file path to the data if the model is moved/shared with someone else. If you have data in external files (e.g. like a .mat file or whatever), you may load this into Activate with commands in the Model or Diagram Contexts. Here you need to either have a relative or absolute path to the file: load('my_model_data.mat') <-- must be in the directory set in "File Browser" or load('C:\my_absolute_path\my_model_data.mat') However, if you want to make your model more generic and portable to other directories, you can use the command "bdeGetCurrentModelFilePath", which returns the same path as your Activate model. Then, you can define the model data relative to your model path (e.g., like in the same directory, as below): my_path=bdeGetCurrentModelFilePath() file_path=strcat(my_path,'/../my_model_data.mat') load(file_path); This is nice when sharing models with others so the paths can be set automagically. Hope this helps someone... Cheers, Andy
  • Create New...