How do I correct this error: "spectrum cannot be displayed for continuous or infinite times"

32 views (last 30 days)
I draw rf energy harvesting circuit for my project in simscape electrical and connected a scope to the circuit for display. When I run the simulation, a blank page displays saying "spectrum cannot be displayed for continuous or infinite times". Fiind attached snip cut of the rf circuit and the displayed error screen.
How do I please solve this issue?
  2 Comments
Stephen23
Stephen23 on 17 Nov 2025 at 9:07
An AI tool that I asked gave this advice:
This error occurs when you're trying to view the frequency spectrum of a signal in a scope, but your simulation is set up for continuous time or runs indefinitely. Here are the solutions:Quick Fixes1. Set a Finite Stop Time
The most common solution:
  • Go to Simulation → Model Configuration Parameters (or press Ctrl+E)
  • Under Solver settings, change the Stop time from inf to a finite value (e.g., 0.01, 0.1, 1, etc.)
  • The appropriate value depends on your circuit - for RF energy harvesting, start with 0.001 or 0.01 seconds
2. Switch Scope to Time Domain View
If you want to keep infinite/continuous simulation:
  • Double-click your Scope block
  • In the scope window, look for the display mode selector (usually a toolbar button)
  • Switch from Spectrum Analyzer mode to Time Domain view
  • This will show the waveform over time instead of frequency spectrum
3. Use Discrete Solver (if applicable)
Sometimes this helps:
  • In Model Configuration Parameters → Solver
  • Change Type from "Variable-step" to "Fixed-step"
  • Set a reasonable Fixed-step size (e.g., 1e-6 for RF circuits)
For RF Energy Harvesting Circuits Specifically
Given your application, I recommend:
  1. Set Stop Time: Use 0.01 or 0.001 seconds (10ms or 1ms) - enough to capture several RF cycles
  2. Check your RF frequency: If you're working with MHz frequencies, ensure your simulation time is long enough to capture multiple periods
  3. Solver settings: Use ode23t or ode15s solver for electrical circuits with fast dynamics
Additional Scope Settings
If you want spectrum analysis:
  • Right-click the scope → Configuration Properties
  • Under Time span, ensure it's not set to "Auto" if causing issues
  • Set a specific time window for analysis
Try the finite stop time solution first - it's the most straightforward fix for your error!
David Kwabena Amesimenu
David Kwabena Amesimenu on 18 Nov 2025 at 1:15
Thank you so much for the solution. I will try the solution and let you know what the outcome will be.
Also, I would like to know how to appreciate my answerer by adding a vote?
Thank you.

Sign in to comment.

Answers (0)

Products


Release

R2025a

Community Treasure Hunt

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

Start Hunting!