PWPFM

版本 1.0.0 (2.4 KB) 作者: Yajur Kumar
PWPFM Signal Generator with Hysteresis
14.0 次下载
更新时间 2023/12/19

PWPFM Signal Generator with Hysteresis

This repository contains MATLAB scripts for generating a Pulse Width Pulse Frequency Modulation (PWPFM) signal with complex hysteresis. The generatePWPFM function creates a PWPFM signal from a given control signal, incorporating hysteresis thresholds for realistic control behavior. A test script is also provided to demonstrate the usage of this function.

Files

  • generatePWPFM.m: The MATLAB function to generate a PWPFM signal with hysteresis.
  • testPWPFM.m: A test script that demonstrates the function usage and visualizes the output.

Function Usage

generatePWPFM

This function generates a PWPFM signal based on a control signal, taking into account specified hysteresis thresholds. It is useful in simulations where control signals are converted into on/off signals with realistic switching behavior.

Syntax

pwpfm_signal = generatePWPFM(control_signal, sampling_rate, pw_base, pf_base, on_threshold, off_threshold)

Parameters

  • control_signal: The input control signal vector.
  • sampling_rate: The sampling rate in Hz.
  • pw_base: Base pulse width in seconds.
  • pf_base: Base pulse frequency in Hz.
  • on_threshold: Two-element vector [positive_on_threshold, negative_on_threshold].
  • off_threshold: Two-element vector [positive_off_threshold, negative_off_threshold].

Returns

  • pwpfm_signal: The generated PWPFM signal.

Test Script (testPWPFM.m)

The test script testPWPFM.m demonstrates how to use the generatePWPFM function. It generates a control signal, applies the PWPFM function, and plots both the control and the PWPFM signals for visualization.

Running the Test

To run the test script, simply execute testPWPFM.m in MATLAB. The script will generate a control signal, process it through the generatePWPFM function, and plot the results.

License

This project is licensed under the MIT License.

引用格式

Yajur Kumar (2024). PWPFM (https://github.com/YajurKumar/PWPFM), GitHub. 检索来源 .

MATLAB 版本兼容性
创建方式 R2023b
兼容任何版本
平台兼容性
Windows macOS Linux
标签 添加标签

Community Treasure Hunt

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

Start Hunting!

无法下载基于 GitHub 默认分支的版本

版本 已发布 发行说明
1.0.0

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库