Method to utilize compressor table in Powertrain Blockset on own purpose

4 views (last 30 days)
Hello.
I want to build a compressor map using the algorithm in the compressor of the powertrain blockset.
Is there a method I can correlate the map below to my own data and use it independently from the blockset in my Simulink model?
Thanks

Answers (1)

Yash Sharma
Yash Sharma on 6 Feb 2024
To build a compressor map and correlate it with your own data for use in a Simulink model independently from the Powertrain Blockset, you would typically follow these steps:
  1. Gather Your Compressor Data: Collect performance data for your specific compressor. This data often includes mass flow rate, pressure ratio, and efficiency at various operating points (speeds and loads).
  2. Normalize the Data: Compressor maps are often plotted with normalized axes, such as corrected mass flow rate and corrected speed, to allow for comparisons across different operating conditions.
  3. Create the Compressor Map: With the data collected, you can create a compressor map. This is typically a 3D surface or contour plot with axes for mass flow rate, pressure ratio, and compressor efficiency.
  4. Fit a Model to the Data: Use curve fitting or surface fitting techniques to create a mathematical model that describes the compressor performance. This could be done with polynomial fits, spline interpolation, or other fitting methods.
  5. Implement the Model in Simulink: Once you have a mathematical representation of your compressor map, you can implement it in Simulink. You could use 2D and 3D Lookup Tables, MATLAB Function blocks, or Interpolation blocks to represent the fitted model.
  6. Validate the Model: Validate your Simulink model by comparing its output with your experimental data or with the performance predicted by the Powertrain Blockset compressor.
  7. Integrate into Your Simulink Model: Finally, integrate the compressor map into your overall Simulink model. Make sure to provide the correct inputs to the compressor map block, such as compressor speed and inlet conditions, and use the outputs, such as mass flow rate and pressure ratio, appropriately in your model.
Here's an example of how you might implement a simple compressor map using a 2D Lookup Table in Simulink:
% Example MATLAB code to prepare a 2D Lookup Table for a compressor map
% Define your experimental data
compressorSpeed = [10000, 20000, 30000]; % Compressor speed in RPM
pressureRatio = [1, 1.5, 2, 2.5, 3]; % Pressure ratio
massFlowRate = [0.1, 0.2, 0.3; % Mass flow rate at 10000 RPM
0.15, 0.3, 0.45; % Mass flow rate at 20000 RPM
0.2, 0.4, 0.6]; % Mass flow rate at 30000 RPM
% Fit a model to your data (this could be more complex depending on your data)
% For illustration, we'll use linear interpolation
% In Simulink, you would use the 'Lookup Table' block and configure it with
% the following parameters:
% - Breakpoints1: compressorSpeed
% - Breakpoints2: pressureRatio
% - Table data: massFlowRate
% - Interpolation method: 'Linear'
% - Extrapolation method: 'Clip'
In Simulink, you would then set up a Lookup Table block with the breakpoints and table data configured as shown in the MATLAB code above. The Lookup Table block will interpolate between data points to provide estimated mass flow rates based on the input pressure ratio and compressor speed.
Please note that this is a simplified example. Real compressor maps can be much more complex and may require more sophisticated methods to fit the data accurately. If your compressor map is complex, consider using MATLAB's Curve Fitting Toolbox or similar tools to create a more accurate representation of the data.
Find below some documentation which will be helpful in your implementation.
Hope it helps!

Categories

Find more on Automotive Applications in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!