1. Add the oscilloscope module to the Simulink model. You can find the module in the Simulink library browser and drag it into the model.
2. Connect the signal that needs power spectral density analysis to the input port of the spectrum module.
3. Double-click the SpectrumScope module to open its parameter setting interface, and select "PowerSpectrumDensity" from the "SpectrumType" drop-down menu.
4. Set other parameters, such as sampling rate and FFT length. You can refer to the help documents or other materials of Simulink.
5. Run the Simulink model, open the display window of the spectrum module, and check the power spectral density function diagram of the signal.