Best Of
Compose - PSIM integration intermediate user's guide
Altair PSIM is a simulation and design software for power electronics, motor drives, and power conversion systems. Altair Compose is an environment for doing math calculations, handling data, automating workflows and much more.
A new, powerful, library has been released in Compose from v2022.3 onwards, the PSIM Integration library. This library allows to seamlessly build workflows integrating both tools for running simulations in batch mode, extracting, handling, and writing results for further usage and, in general, for saving time and effort in design and simulation tasks on PSIM.
Check out the Compose - PSIM Integration starter’s guide if you haven’t already, as we go over the very basics there. In this post, we explore some other very powerful features from the PSIM Integration library, concretely, you will learn how to split simulations into multiple chunks and change the simulation time step, print time, etc. on the go to create more efficient workflows.
PSIM Schematic
The PSIM Schematic file (.psimsch) that we will be using is a simple buck converter: A DC – DC converter that is very common in power electronics. It lowers voltage applied to a load with respect to its input, while increasing current.
The results produced as outputs of this simulation are I(Q2): Current flowing through the MOSFET and Vout: Voltage at the voltage probe. All circuit components have fixed values this time.
Leveraging save & load flags
PSIM features the SAVE and LOAD functions, in which circuit voltages, currents and other quantities can be saved at the end of a simulation session and loaded back as the initial conditions for the next simulation session. This provides the flexibility of running a long simulation in several shorter stages with different time steps and parameters. Components values and parameters of the circuit can be changed from one simulation session to the other.
When running simulations from Compose, you can set these flags in the parameters definition used by the schematic.
Setting total simulation time and solver time step
Same as with save and load flags, the total simulation time and the solver time step can be declared in the parameters definition. The time step must be at least ten times faster than the fastest switching speed in the circuit. Excessively small time steps can result in long simulation times.
Setting print time and print step
Setting the print time and print step are useful for reducing the size of files produced as outputs. The print time is the point from which results will be stored in the output file, no results will be stored prior to this time. A print step of n means that only one in every n data points will be saved to the output file.
Let’s have a look at how to set these parameters in a PSIM script. First of all, let’s define the schematic to simulate and the name of the output SMV file to create.
close all, clear, clc
% Define input & output files for PSIM
input_var.FilePath = '.\buck.psimsch';
input_var.GraphFilePath = '.\buck_results.smv';
Now let’s define a parameters string for the simulation. It will contain desired simulation time, the timestep, and we will set the value of SAVEFLAG to 1. As the highest switching frequency is known to be 200 kHz, let’s define the timestep in such a way that there are 10 steps for every switching cycle, that is, the largest allowed timestep.
% Total time for simulating system's transient response
totalTime = 0.001;
% Get maximum step size that gives 10 points per cycle
Fsw = 200e3;
timeStep = (1/Fsw)/10;
% Create parameters string for simulation
input_var.Parameters = sprintf('TOTALTIME = %g\nTIMESTEP = %g\nSAVEFLAG = 1', totalTime, timeStep);
% Run PSIM simulation
simResults = PsimSimulate(input_var);
An SSF file containing the initial conditions for any subsequent simulations should have been created so, after reading all variables from the results, let’s just make sure an SSF file is indeed present in the working directory. I’m doing this just for debugging.
% Extract transient results
tTransient = simResults.Graph.Values{1};
IQTransient = simResults.Graph.Values{2};
VoutTransient = simResults.Graph.Values{3};
% Check SSF file was created
if isfile('.\buck.ssf')
disp('SSF file created succesfully');
else
error('SSF file not created');
end
Let’s now simulate further, from 1 ms to 3 ms, using the initial conditions produced by the previous simulation (using LOADFLAG). Let’s also set the timestep to half of its previous value for a more detailed response now.
% Simulate steady state with new timestep and loading SSF file
totalTime = 0.003;
timeStep = (1/Fsw)/20;
input_var.Parameters = sprintf('TOTALTIME = %g\nTIMESTEP = %g\nLOADFLAG = 1', totalTime, timeStep);
simResults = PsimSimulate(input_var);
% Extract steady-state results
tSS = simResults.Graph.Values{1};
IQSS = simResults.Graph.Values{2};
VoutSS = simResults.Graph.Values{3};
% Plot output voltage
figure(1);
plot(tTransient, VoutTransient);
hold on
plot(tSS, VoutSS);
xlabel('Time [ms]');
ylabel('Output Voltage');
legend('Transient', 'Steady-state');
% Plot switching current zoomed in
figure(2);
plot(tTransient, IQTransient, 'o-');
hold on
plot(tSS, IQSS, 'o-');
xlim([tTransient(end-20) tSS(40)]);
xlabel('Time [ms]');
ylabel('Switching Current');
legend('Transient', 'Steady-state');
Plotting both simulations’ results will illustrate the effect of these setting perfectly:
As you can see, the second simulation starts only after the time in which the first one finished and, zooming into the switching current plot, the new, smaller, time step is noticeable.
This is extremely useful. It can be used for reducing the computational burden of our simulations on segments we are not interested in or maybe we may want to initialize a system and then test many different events that occur once it’s already in steady state.
Let’s continue and repeat the full simulation now in a single chunk, but let’s set a print time such that the transient part of the simulation is not stored in the output.
% Simulate transient + steady-state at once, omit report results only from desired print time until end
timeStep = (1/Fsw)/50;
printTime = 0.002;
input_var.Parameters = sprintf('TOTALTIME = %g\nTIMESTEP = %g\nPRINTTIME = %g', totalTime, timeStep, printTime);
simResults = PsimSimulate(input_var);
% Extract steady-state results
t = simResults.Graph.Values{1};
IQ = simResults.Graph.Values{2};
Vout = simResults.Graph.Values{3};
% Plot output voltage
figure(3);
curve = plot(t, Vout, 'o-');
set(curve, 'displayname', 'Print step = 1');
hold on
Lastly, we can repeat the simulation, now setting a print step of 10 and overlay the output voltage plot for both simulations. Zooming in, this clearly shows the trade-off between output file size and fidelity that this parameter has.
% Change print step to only report every n time steps
printStep = 10;
input_var.Parameters = sprintf('TOTALTIME = %g\nTIMESTEP = %g\nPRINTTIME = %g\nPRINTSTEP = %d', totalTime, timeStep, printTime, printStep);
simResults = PsimSimulate(input_var);
% Extract steady-state results
t = simResults.Graph.Values{1};
IQ = simResults.Graph.Values{2};
Vout = simResults.Graph.Values{3};
% Plot output voltage
curve = plot(t, Vout, 'o-');
xlim([t(1), t(15)])
xlabel('Time [ms]');
ylabel('Output Voltage');
set(curve, 'displayname', sprintf('Print step = %d', printStep));
legend on
As you can see, only one in ten data points was stored in the second simulation. All these tricks are ready to be implemented in Compose and will prove very useful to take your workflows to the next level. Go ahead and leverage them under real circumstances to fully reap the benefits.
Check out the previous Compose - PSIM integration posts:
Altair Multibody Solutions 2023 Release highlights
The 2023 release of Altair Multibody solutions for HyperWorks is around the corner, and it is packed with very exciting features! Here are the main highlights.
This version marks the transition of Altair MotionView® to a new modern interface replacing the classic Desktop, offering an enhanced user experience for Multibody simulations. The new interface offers new easy to use workflows to create and edit entities with guidebars, micro-dialogs, and entity editors. What is more exciting is the solve and review workflow with live visuals of the solution progress, animating the results right within MotionView! It also tracks the run history, offering easy access to previously run models and their results.
Watch this video to learn more.
Starting with this release, MotionView supports extensions facilitated by the Extension Manager. These extensions represent an innovative approach to integrating custom tools and solutions seamlessly into the product interface. This streamlined integration method ensures a cohesive user experience, allowing users to effortlessly harness the power of extensions while navigating the product interface.
The Vehicle solutions will be one of the first available extensions, complete with its unique workflow, components, and event library, all conveniently accessible through the Entity Browser.
Furthermore, the Car library has been enhanced, particularly in powertrain and driveline systems, now featuring advanced options such as center differentials, limited slip differentials, and automatic transmission models. Additionally, the tire and road models have been refined to incorporate soft-soil effects and custom obstacles, offering a more realistic simulation experience. Notably, this innovative soft-soil solution is versatile, being applicable to both tires and tracked vehicles within the same model, ensuring a unified and comprehensive approach to simulation.
A Machinery extension will be available soon at the Altair Marketplace. The Machinery extension consists of a library of gears and bearings as higher-level entities that can be used in Motion models.
For more details on these features and other enhancements, please refer to the Altair Multibody Solutions 2023 Release Notes.

Re: PIL by using F28069M
Hi Hallay,
We need to see the PIL block settings. Also, when using an instaspin enabled processor you need to check this box, this impact the memory location for the sin lookup tables used.
Re: Deformable bolt modeling with initial stress
Hello Naresh Kini,
There are a few articles in Altair Community about this topic. Would you please take a look and see if it helps?
Pretension with /PRELOAD on solid bolt - Preload on solid bolt
Using /STATE to initialize elements in Radioss - Initializing element states in Radioss
3D Bolt Pretensioning - Video showing the workflow of pretensioning in HyperMesh
Radioss solid mesh Bolt preloading with 1D spring element - Bolt pretension using spring elements
Kind Regards,
Guilherme.
Altair Twin Activate: What's new in Twin Activate 2023
Highlights of the 2023 Release
As part of the Digital Twin focus in Altair, Activate is now Twin Activate, and it is positioned at the center of the current Digital Twin offering.
Transition from Menu to Full Ribbon Control
The menus are now represented as ribbons.
Advanced Tooltips for all Actions
Quick Insert of Blocks and Components
Now it is possible to insert blocks by right clicking button and searching by the block name. It is not limited to simple blocks, it finds also physical components (Modelica), Spice components, and user elements.
Unsaved Indicator in Project Browser


Message Center

Mat Explorer

Extended Support of FMI 3.0
- Provide FMI-3.0 export for array input/output variables
- Support Safe-mode for FMI-3.0 import
- Write signals into a CSV file for FMI-3.0 FMU
- Write signals into MTSF file for FMI-3.0 FMUs
- Handling of fixed structural variables with dependencies has been added to let the user change the dimension sizes of input, output, and internal variables at the initialization
- Support for FMI-3.0 with a source code interface and build configurations
Code Generation and Export: Embedded Solver
- The use of an embedded solver with a super block is defined in the context of the block using vssSetInlineSolver.
- More convenient is the definition of the embedded solver in the code generation UI (more details below).
Support of embedded solver in UI
- Embedded solver applicable for Inlined Code Generation
- Applicable for all targets
- Activate block
- FMU
- Host standalone
- Python
- Embed block
- Setting of solver parameters in separate tab
License free export

romAI Director - Redesign and Enhancements
New GUI and easier Workflow
On Twin Activate 2023, a new workflow improves ease of use. The GUI has following sections:
- File Menu: Contains generic actions
- Top ribbon: Buttons based on uipushtool feature
- Tabs: Provide the switching feature
- Left table: Choose signals and models
- Canvas: Shows plots
- Left panels: Show dataset and model information
- Right panels: Input parameters
- File information text boxes
Pre-Processor
The Pre-Processor lets you plot, filter signals, and saving data.
Builder
The Builder has the following functions:
- Arrange the parameters in tabs
- Add a table for all features that go in training
- Physical Constraints can be selected using a drop-down menu instead of writing
Post-Processor
The Post-Processor has the following features:
- Visualize all results (Loss metrics, Accuracy Check, Hyper Planes, and Time Simulation) on a single page and with less clicks
- Process more than one model without loading models repeatedly
Heat Map

Auto Exploration

Stop Training

Re: Altair Inspire® Challenge #5: Prosthetic Knee Motion Analysis
Hi everyone, here's the results i found
Re: Directional Conflict in Motor
Hello,
There is a good chance you defined the motor between one arm and ground instead of between the two arms. When defining the motor, the first click defines the shaft part, the second defines the base part. For example, if you just click twice on the arm, it will attach the motor to that part and ground. Make sure your second selection is on the second part. Then make sure Restrain Centerline option (via the Property Editor) is turned on (Revolute).
Tip: A good debug technique in these situations can be to turn off the sensor and let the simulation proceed with the error, so that the problem may become (visibly) obvious. Go to Motion Run Settings --> Advanced --> Model Checking, and change Runtime Sensors to None. Then solve the analysis. Many times, you can physically see what's happening, like the parts separating, and it can become apparent where you might have to start looking to debug.
Hope this helps.
Scott Z
Re: Directional Conflict in Motor
Hi Lam,
Please redefine the motor.
Please select base and a base. It has to be different.
Best regards.
Re: Computation the inductance of bar conductor by Simulation in Flux3D
Hello Sam,
in your case as you have only a portion of bar in the FE domain without a closed loop of current, the FluxPEEC application will be more adapted to compute the inductance in this case.
To start this application select PEEC instead of 3D in the supervisor.
Find attached a text file containing command to build and solved the corresponding FluxPEEC project.
At the end you will obtained the impedance by clicking on the impedance probe in the data tree.
I hope this helps.
Best regards.
Cyril Favre
