La traduction de cette page n'est pas à jour. Cliquez ici pour voir la dernière version en anglais.
Créer des composants et des bibliothèques personnalisés
Explorez des exemples qui illustrent la création de composants et de bibliothèques personnalisés.
Exemples présentés
Vehicle HVAC System
Models moist air flow in a vehicle heating, ventilation, and air conditioning (HVAC) system. The vehicle cabin is represented as a volume of moist air exchanging heat with the external environment. The moist air flows through a recirculation flap, a blower, an evaporator, a blend door, and a heater before returning to the cabin. The recirculation flap selects flow intake from the cabin or from the external environment. The blender door diverts flow around the heater to control the temperature.
Aircraft Environmental Control System
Models an aircraft environmental control system (ECS) that regulates pressure, temperature, humidity, and ozone (O3) to maintain a comfortable and safe cabin environment. Cooling and dehumidification are provided by the air cycle machine (ACM), which operates as an inverse Brayton cycle to remove heat from pressurized hot engine bleed air. Some hot bleed air is mixed directly with the output of the ACM to adjust the temperature. Pressurization is maintained by the outflow valve in the cabin. This model simulates the ECS operating from a hot ground condition to a cold cruise condition and back to a cold ground condition.
PEM Fuel Cell System
Model a proton exchange membrane (PEM) fuel cell stack with a custom Simscape™ block. The PEM fuel cell generates electrical power by consuming hydrogen and oxygen and producing water vapor. The custom block represents the membrane electrode assembly (MEA) and is connected two separate moist air networks: one for the anode gas flow and one for the cathode gas flow.
Système d'électrolyse à MEP
Cet exemple montre comment modéliser un électrolyseur d’eau à membrane échangeuse de protons (MEP) avec un bloc Simscape™ personnalisé. L’électrolyseur MEP consomme de l’électricité pour décomposer l’eau en hydrogène et en oxygène. Le bloc personnalisé représente l’assemblage membrane-électrode (MEA). Il est connecté à un réseau de fluide thermique et à deux réseaux d’air humide distincts : le réseau de fluide thermique modélise l’alimentation en eau, le réseau d’air humide de l’anode modélise le flux d’oxygène et celui de la cathode modélise le flux d’hydrogène.
Ultracapacitor Energy Storage with Custom Component
Use the Simscape™ example library Capacitors_lib. The model is constructed using components from the example library. The circuit charges an ultracapacitor from a constant 0.05 amp current source, and then delivers a pulse of current to a load. The ultracapacitor enables a much higher current to be delivered than is possible directly from the current source. The library contains capacitor models with different levels of fidelity to allow exploration of the effect of losses and nonlinearity.
Transmission Line
A lumped parameter transmission line model. It is built from a custom Simscape™ component that defines a single T-section segment. The model concatenates 50 segments, each of length 0.1m, thereby modeling a 5m length of coaxial cable. The transmission delay can be observed from the simulation results.
Engine Cooling System
Model a basic engine cooling system using custom thermal liquid blocks. A fixed-displacement pump drives water through the cooling circuit. Heat from the engine is absorbed by the water coolant and dissipated through the radiator. The system temperature is regulated by the thermostat, which diverts flow to the radiator only when the temperature is above a threshold.
Brayton Cycle (Gas Turbine) with Custom Components
Models a gas turbine auxiliary power unit (APU) based on the Brayton Cycle. The Compressor and Turbine blocks are custom components based on the Simscape™ Foundation Gas Library. The power input to the system is represented by heat injection into the combustor; actual combustion chemistry is not modeled. A single shaft connects the compressor and the turbine so that the power from the turbine drives the compressor. The APU is a free turbine that further expands the exhaust stream to produce output power.
Rankine Cycle (Steam Turbine)
Models a steam turbine system based on the Rankine Cycle. The cycle includes superheating and reheating to prevent condensation at the high-pressure turbine and the low-pressure turbine, respectively. The cycle also has regeneration by passing extracted steam through closed feedwater heaters to warm up the water and improve cycle efficiency.
Battery Cell with Custom Electrochemical Domain
Use the Simscape™ example library ElectroChem_lib. In the model Fe3+ ions are reduced to Fe2+, and Pb is oxidized to Pb2+, thereby releasing chemical energy. The molar flow rate of lead ions is half that of the iron ions as two electrons are exchanged when Pb is oxidized to Pb2+. The chemical potential of the Pb source is by convention zero as it is a solid.
Lead-Acid Battery
Model a lead-acid battery cell using the Simscape™ language to implement the nonlinear equations of the equivalent circuit components. In this way, as opposed to modeling entirely in Simulink®, the connection between model components and the defining physical equations is more easily understood. For the defining equations and their validation, see Jackey, R. "A Simple, Effective Lead-Acid Battery Modeling Process for Electrical System Component Selection", SAE World Congress & Exhibition, April 2007, ref. 2007-01-0778.
Cellule de batterie au lithium - circuit équivalent à une branche RC
Cet exemple montre comment modéliser une cellule de batterie au lithium en utilisant le langage Simscape™ pour implémenter les éléments d’un modèle de circuit équivalent à une branche RC. Pour en savoir plus sur les équations de définition et leur validation, consultez l’article de T. Huria, M. Ceraolo, J. Gazzarri et R. Jackey. « High Fidelity Electrical Model with Thermal Dependence for Characterization and Simulation of High Power Lithium Battery Cells », IEEE International Electric Vehicle Conference, mars 2012.
Cellule de batterie au lithium - circuit équivalent à deux branches RC
Cet exemple montre comment modéliser une cellule de batterie au lithium en utilisant le langage Simscape™ pour implémenter les éléments d’un modèle de circuit équivalent à deux branches RC. Pour en savoir plus sur les équations de définition et leur validation, consultez l’article de T. Huria, M. Ceraolo, J. Gazzarri et R. Jackey. « High Fidelity Electrical Model with Thermal Dependence for Characterization and Simulation of High Power Lithium Battery Cells », IEEE International Electric Vehicle Conference, mars 2012.
Lithium-Ion Battery Pack with Fault Using Arrays
Simulate a battery pack that consists of multiple series-connected cells. It also shows how you can introduce a fault into one of the cells to see the impact on battery performance and cell temperatures. The battery pack is modeled in Simscape™ language by connecting cell models in series using arrays. You can represent the fault by defining different parameters for the faulty cell.
Variable Transport Delay
Use Simscape™ to model a variable transport delay. The Transport Delay block models signal propagation through media moving between the Input and the Output terminals. The media velocity may vary, thus it is specified through the block port. The distance between the terminals as well as the initial output are constant and they are specified as block parameters.
Asynchronous PWM Voltage Source
How the Simscape™ Foundation Library PS Asynchronous Sample & Hold block can be used to build components with more complex behaviors. The model implements a controllable PWM voltage source where the PWM on-time (the duty cycle) is proportional to the physical signal input u.
Discrete-Time PWM Voltage Source
How the discrete-time Simscape™ Foundation Library PS Counter block can be used to build components with more complex behaviors. The model implements a controllable PWM voltage source where the PWM on-time (the duty cycle) is proportional to the physical signal input u.
Actuation Circuit with Custom Pneumatic Components
Model a controlled actuator using simplified custom pneumatic components. There are two across variables, defined as pressure and temperature, and two through variables, defined as mass flow rate and heat flow rate. The simplified approach means that every node in the circuit must have a volume of gas associated with it. This physical volume of gas in the circuit is represented by the Constant Volume Pneumatic Chamber blocks, the Pneumatic Piston Chamber blocks, and the Pneumatic Atmospheric Reference block. Conversely, the Foundation Library gas components require no such connection rules at every node. See the Circuit de commande pneumatique example for a more capable way of modeling pneumatic systems using Foundation Library gas components.
Simscape Functions
Write Simscape™ functions to compute numerical values with Simscape expressions and how to use Simscape functions to improve code reuse across components. The top two Simscape component blocks ( inside the "Use no Simscape functions" box ) are respectively created using two Simscape component files. Comparing these two component files, similar Simscape expressions can be observed on the right hand side of the equation to compute numerical values, which is essentially a modification of exp(i) to provide protection for large magnitude of i. Such expressions are common in standard diode modeling. Using Simscape functions, such expressions are abstracted out into a Simscape function file, and their usages inside the component files are replaced by calls to such Simscape functions. The bottom two Simscape component blocks ( inside the "Use Simscape functions" box ) are created using component files using Simscape functions.
Mass on Cart Using an Ideal Hard Stop
A cart bouncing between the two ends of an ideal hard stop, while a mass slides freely on top of it. The friction between the mass and cart is modeled using an ideal, modechart-based friction block, while the hard stop is modeled using instantaneous modes and entry actions. When the cart hits the bounds of the hard stop, the impulsive force is propagated to the mass above, causing it to be displaced as it transitions from static to dynamic friction modes.
Rope Pull In the Position-Based Translational Domain
A force pulling on the end of a cable or rope that has a large load on its other end. The rope is modeled with distributed mass and elasticity using Mass With Length (PB), Translational Spring (PB), and Translational Damper (PB) blocks. When the force increases from 0 N to 1,000 N, it excites longitudinal vibrations in the rope.
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)