Large-scale Wave Energy Farm Data Visualization Analysis
Tutorial
Assisted by AI
Explore our analysis of data visualization techniques for a Large-scale Wave Energy Farm, showcasing insights into its efficiency and potential.
Introduction
Wave energy converters (WECs) represent a promising avenue for renewable energy. This study examines their performance in Perth and Sydney using configurations of 49 and 100 buoys. By visualizing power distribution, q-factors, and algorithmic performance through LightningChart, we uncover insights into the efficiency and effectiveness of various WEC layouts.
About the Dataset
The dataset includes 4 CSV files for 49 and 100 wave energy converters based on Perth and Sydney wave scenarios. Each instance represents the coordination of wave energy converters in a wave farm plus the total power output and individual power of each converter and q-factor.
LightningChart Python
LightningChart Python was chosen for its ability to:
- Handle large datasets seamlessly.
- Provide interactive 3D and 2D visualizations.
- Offer real-time updates with unmatched performance.
Its flexibility allows for precise customization, making it the ideal tool for renewable energy analysis.
Setting Up Python Environment
To begin working on this project, it’s necessary to install the required libraries, including Pandas and LightningChart Python. You can do this by following the steps below:
- First, you need to install Python: Download and install the latest version of Python from the official Python website.
- Second, you need to Install Pandas and LightningChart:
Use the pip package manager to install the necessary libraries by running these commands:
pip install lightningchart
pip install pandas numpy
Visualizing Data with LightningChart Python
LightningChart provides an advanced platform for visualizing intricate datasets effectively. Here, we delve into various visualizations to uncover trends and patterns in waste production and management across industries and activities.
3D Scatter Charts: Spatial Power Distribution
The 3D scatter charts visualize the power distribution across the buoy configurations for Perth and Sydney. Each chart plots the spatial coordinates (X and Y) of the buoys and their corresponding power output (Z-axis), with color gradients indicating power intensity.
Perth_49:
The chart reveals clusters of buoys with varying power outputs. Higher power buoys (red) are scattered among lower-power ones (blue and green), indicating a more uneven distribution of power.
Perth_100:
Adding more buoys results in a denser configuration. The power distribution appears slightly more balanced than the 49-buoy configuration but still shows significant variation in power levels.
Sydney_49:
Similar to Perth_49, the Sydney layout shows distinct power clusters. However, the power distribution appears slightly more uniform compared to Perth.
Sydney_100:
Like Perth_100, this configuration demonstrates a dense layout with slightly better power balance compared to the 49-buoy configuration. The highest power levels (red) are concentrated more systematically.
import lightningchart as lc
import pandas as pd
with open('D:/fatemeh_ajam/lightningChart/A/license-key', 'r') as f:
lc.set_license(f.read().strip())
datasets = {
"Perth_49": "dataset/WEC_Perth_49.csv",
"Perth_100": "dataset/WEC_Perth_100.csv",
"Sydney_49": "dataset/WEC_Sydney_49.csv",
"Sydney_100": "dataset/WEC_Sydney_100.csv"
}
dashboard = lc.Dashboard(rows=2, columns=2, theme=lc.Themes.Dark)
for index, (title, file_path) in enumerate(datasets.items()):
data = pd.read_csv(file_path)
x, y, power = data['X1'], data['Y1'], data['Power1']
chart = dashboard.Chart3D(row_index=index // 2, column_index=index % 2, title=f"{title} - Power Distribution")
point_series = chart.add_point_series().add(x=x.tolist(), y=y.tolist(), z=power.tolist())
point_series.set_palette_point_colors(
steps=[
{"value": power.min(), "color": lc.Color('blue')},
{"value": power.mean(), "color": lc.Color('green')},
{"value": power.max(), "color": lc.Color('red')}
],
look_up_property='z',
interpolate=True
)
chart.get_default_x_axis().set_title('X Coordinate')
chart.get_default_y_axis().set_title('Y Coordinate')
chart.get_default_z_axis().set_title('Power (Watts)')
chart.add_legend().add(data=point_series)
dashboard.open()
Key Takeaways:
- 100-buoy configurations (both Perth and Sydney) distribute power more uniformly than 49-buoy layouts.
- Sydney consistently demonstrates better power distribution than Perth, regardless of the number of buoys.
3D Surface Charts: Smoothed Power Intensity
The charts visualize the power distribution for wave energy converters (WECs) in Perth and Sydney for two configurations: 49 and 100 buoys. Each 3D surface chart shows how power varies spatially (on the X and Y axes) across the buoy grid, with color gradients representing the intensity of power distribution:
Top-left (Perth, 49 Buoy):
The power distribution is uneven, with peaks indicating high power concentration in certain areas. The smaller grid results in concentrated power zones with moderate variation.
Top-right (Sydney, 49 Buoy):
The power distribution is more uniform compared to Perth, with fewer extreme peaks. Indicates better efficiency in this configuration.
Bottom-left (Perth, 100 Buoy):
Expanding the grid to 100 buoys spreads the power more evenly across the area. Some power peaks remain but are less pronounced.
Bottom-right (Sydney, 100 Buoy):
Similar to Perth, the larger grid smooths out the power distribution, maintaining balance across the area. Sydney’s configurations consistently show better power uniformity.
import pandas as pd
import numpy as np
import lightningchart as lc
from scipy.interpolate import griddata
with open('D:/fatemeh_ajam/lightningChart/A/license-key', 'r') as f:
lc.set_license(f.read().strip())
def create_surface(chart, title, x, y, power, grid_size):
X, Y = np.meshgrid(np.linspace(x.min(), x.max(), grid_size), np.linspace(y.min(), y.max(), grid_size))
Z = griddata((x, y), power, (X, Y), method='cubic')
Z[np.isnan(Z)] = np.nanmean(power)
surface = chart.add_surface_grid_series(columns=Z.shape[1], rows=Z.shape[0])
surface.set_start(x=x.min(), z=y.min()).set_end(x=x.max(), z=y.max())
surface.invalidate_height_map(Z.tolist()).invalidate_intensity_values(Z.tolist())
surface.set_palette_coloring(steps=[
{"value": Z.min(), "color": lc.Color('blue')},
{"value": Z.max(), "color": lc.Color('red')}], interpolate=True)
chart.set_title(title).get_default_x_axis().set_title('X (m)')
chart.get_default_y_axis().set_title('Y (m)').get_default_z_axis().set_title('Power (W)')
files = [("Perth Wave (49 Buoy)", "WEC_Perth_49.csv"), ("Sydney Wave (49 Buoy)", "wec_Sydney_49.csv"),
("Perth Wave (100 Buoy)", "WEC_Perth_100.csv"), ("Sydney Wave (100 Buoy)", "WEC_Sydney_100.csv")]
dashboard = lc.Dashboard(columns=2, rows=2, theme=lc.Themes.Black)
for i, (title, file) in enumerate(files):
data = pd.read_csv(f"dataset/{file}")
chart = dashboard.Chart3D(column_index=i % 2, row_index=i // 2)
create_surface(chart, title, data['X1'], data['Y1'], data['Power1'], 100)
dashboard.open()
Key Takeaways:
- The 49-buoy configurations show concentrated power zones, while the 100-buoy setups distribute power more evenly.
- Sydney configurations perform better in terms of power uniformity, reducing high-intensity zones compared to Perth.
3D Bar Chart: Algorithm Performance
Based on this table, the following chart has been created:
This chart illustrates the performance of various algorithms applied to datasets from two regions, Perth and Sydney, with different dataset sizes (49 and 100 points).
import pandas as pd
import lightningchart as lc
data = pd.read_excel('data.xlsx')
data = (data - data.min()) / (data.max() - data.min())
chart = lc.Chart3D(theme=lc.Themes.Black, title="Algorithm Performance")
chart.add_box_series(data.values)
chart.open()
Key Takeaways:
- Certain algorithms show consistently high performance (closer to red) across all regions.
- Variations in performance highlight the relative strengths and weaknesses of each algorithm depending on the region.
- Sydney regions (49 and 100) appear to have higher normalized values compared to Perth.
Line Charts: q-Factor Efficiency
The chart illustrates the q-factor performance across different buoy layouts, showing how efficiently each configuration distributes power as buoys are removed. The q-factor is a ratio of the total power generated by all buoys to the power remaining after removing one buoy at a time.
import pandas as pd
import lightningchart as lc
with open('license-key', 'r') as f:
mylicensekey = f.read().strip()
lc.set_license(mylicensekey)
datasets = {
"Perth_49": "dataset/WEC_Perth_49.csv",
"Perth_100": "dataset/WEC_Perth_100.csv",
"Sydney_49": "dataset/WEC_Sydney_49.csv",
"Sydney_100": "dataset/WEC_Sydney_100.csv"
}
styles = {
"Perth_49": {"color": lc.Color('blue'), "shape": "circle"},
"Sydney_49": {"color": lc.Color('red'), "shape": "triangle"},
"Perth_100": {"color": lc.Color('orange'), "shape": "square"},
"Sydney_100": {"color": lc.Color('green'), "shape": "diamond"}
}
chart = lc.ChartXY(theme=lc.Themes.Dark, title="q-factor performance for buoy layouts")
chart.get_default_x_axis().set_title("Buoy Number")
chart.get_default_y_axis().set_title("q-factor")
for name, filepath in datasets.items():
data = pd.read_csv(filepath)
q_factors, buoy_numbers = [], []
remaining_buoys = data.filter(like='Power')
total_power = data['Total_Power'].iloc[0]
while not remaining_buoys.empty:
q_factors.append(total_power / remaining_buoys.sum(axis=1).iloc[0])
buoy_numbers.append(len(remaining_buoys.columns))
remaining_buoys = remaining_buoys.drop(columns=remaining_buoys.iloc[0].idxmin())
series = chart.add_point_line_series().set_name(name)
series.set_point_shape(styles[name]["shape"]).set_point_color(styles[name]["color"])
series.set_line_color(styles[name]["color"]).add(x=buoy_numbers, y=q_factors)
chart.add_legend().add(chart)
chart.open()
Key insights:
- Perth_49 and Sydney_49 configurations (blue and red lines) experience a sharper decline in q-factor compared to Perth_100 and Sydney_100 (orange and green lines), indicating that layouts with 100 buoys are more resilient in maintaining power performance as buoys are removed.
- The smoother decline of the 100-buoy layouts highlights their better overall efficiency, making them more suitable for applications requiring consistent power distribution.
- The chart is a direct comparison tool, visually emphasizing the efficiency differences between 49-buoy and 100-buoy configurations in both Perth and Sydney setups.
Comparative Dashboard
The dashboard displays six scatter plots, each showing the spatial distribution of buoys and their respective power output for configurations in Perth and Sydney under two scenarios: original and alternative.
- Top Row (Perth):
Perth 49 Buoys (Left): Shows the original layout with 49 buoys, achieving a total power of 4,145,252 W and a q-factor of 0.8, indicating moderate efficiency in power distribution.
Perth 100 Buoys (Center): Displays the layout with 100 buoys, achieving higher power output (7,347,403 W) but a slightly lower q-factor (0.76), suggesting diminished efficiency as more buoys are added.
Perth 49 Buoys (Alt Scenario, Right): Introduces random offsets to simulate real-world variations. The total power decreases to 7,235,425 W, and the q-factor reduces to 0.75, highlighting the sensitivity of the system to spatial deviations.
- Bottom Row (Sydney):
Sydney 49 Buoys (Left): Shows the original layout with 49 buoys, achieving a total power of 4,177,658 W and the highest q-factor (0.88) in the dashboard, demonstrating superior efficiency in maintaining power output.
Sydney 100 Buoys (Center): Displays the layout with 100 buoys, achieving 7,362,279 W but with the lowest q-factor (0.7) among all original scenarios, highlighting efficiency challenges in this layout.
Perth 100 Buoys (Alt Scenario, Right): Introduces random offsets and variations, resulting in a total power of 7,337,922 W and a q-factor of 0.7, further emphasizing the effect of design and environmental changes.
import lightningchart as lc
import pandas as pd
import numpy as np
with open('license-key', 'r') as f:
lc.set_license(f.read().strip())
files = [("WEC_Perth_49.csv", "Perth 49", 0.8, 4145252),
("WEC_Perth_100.csv", "Perth 100", 0.76, 7347403),
("WEC_Sydney_49.csv", "Sydney 49", 0.88, 4177658),
("WEC_Sydney_100.csv", "Sydney 100", 0.7, 7362279)]
dashboard = lc.Dashboard(theme=lc.Themes.Black, rows=2, columns=3)
def add_chart(file, title, row, col, q_factor, power, alt=False):
data = pd.read_csv(f"dataset/{file}").iloc[0]
coords = pd.DataFrame({'X': data.filter(like='X'), 'Y': data.filter(like='Y'), 'Power': data.filter(like='Power')})
if alt:
coords['X'] += np.random.uniform(-50, 50, len(coords))
coords['Y'] += np.random.uniform(-50, 50, len(coords))
coords['Power'] *= np.random.uniform(0.9, 1.1, len(coords))
title += " (Alt Scenario)"
dashboard.ChartXY(title=f"{title}\nPower={power} W, q-factor={q_factor}", row_index=row, column_index=col) \
.add_point_series(lookup_values=True).set_palette_point_coloring(
steps=[{'value': coords['Power'].min(), 'color': lc.Color('blue')},
{'value': coords['Power'].mean(), 'color': lc.Color('green')},
{'value': coords['Power'].max(), 'color': lc.Color('red')}]
).append_samples(coords['X'], coords['Y'], coords['Power']).set_point_size(10).set_point_shape('Square')
for i, (file, title, q, p) in enumerate(files):
add_chart(file, title, i // 3, i % 3, q, p)
if i < 2:
add_chart(file, title, i // 3, 2, q, p, alt=True)
dashboard.open()
Key Takeaways:
- Smaller configurations (49 buoys) generally perform better in terms of efficiency (higher q-factor), while larger configurations (100 buoys) produce more power but are less efficient.
- Sydney layouts outperform Perth layouts in maintaining power efficiency.
- Alternative scenarios reveal how randomness and variability in buoy placement and performance impact overall efficiency and output.
Conclusion
This study demonstrates the potential of wave energy converters (WECs) in renewable energy production, emphasizing the importance of efficient layouts and algorithmic optimization. By leveraging LightningChart, we visualized and analyzed WEC performance across Perth and Sydney for both 49 and 100-buoy configurations.
The visualizations revealed that 100-buoy layouts produce higher total power but at the cost of efficiency, as indicated by lower q-factors compared to 49-buoy configurations.
Sydney consistently outperformed Perth in terms of power uniformity, underscoring regional variations in wave energy potential. Furthermore, advanced algorithms like MS-bGA and MS-bDE showed superior performance, ensuring better optimization across all scenarios.
LightningChart’s ability to handle large datasets with real-time responsiveness was instrumental in this analysis. Its robust performance, customizable visualizations, and seamless interaction allowed us to extract actionable insights.
These findings can guide the design of more efficient wave farms, ensuring greater sustainability and energy output in future implementations.
Continue learning with LightningChart
Using Average Directional Index for Fintech App Development
Learn how the Average Directional Index measures trend strength, confirms signals, and improves trading strategies with ADX and DI indicators.
Global Renewable Energy Indicators
Explore how to visualize global renewable energy indicators effectively with LightningChart Python for insightful data representation.
Accumulative Swing Index for Fintech Applications
Learn how the Accumulative Swing Index Indicator tracks long-term market trends, measures momentum, and simplifies technical analysis in Fintech Applications.
