-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathBrightSolarModel_SDSIG.m
More file actions
131 lines (117 loc) · 6.69 KB
/
BrightSolarModel_SDSIG.m
File metadata and controls
131 lines (117 loc) · 6.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
% +---------------------------------------------------------------------+
% | Spatially Decorrelating Solar Irradiance Generator, SDSIG |
% +---------------------------------------------------------------------+
% | This script will produce 1-minutely resolution irradiance data upon |
% | an arbitrary plane of defined latitude, orientation and aspect for |
% | a defined period of time. It will produce a time series for any |
% | number of properties within an X-by-Y domain (validated for 1500m2).|
% | Each property can have individual orientation, tilt, and position |
% | within the X,Y domain. The latitude and longitude provided are |
% | assigned to all properties and is referred to as the central lat/lon|
% |
% | The script requires inputs of cloud cover (okta), cloud base height,|
% | 10m wind speed and atmospheric pressure. Notes on how to remove the |
% | dependency on cloud base height are included in the stochastic |
% | weather script. This model was tested using okta values taken from |
% | UK hourly weather data decords downlaoded from MIDAS of the |
% | British Atmospheric Data Centre. Analysis of the wind speed, |
% | cloud cover, cloud height, wind speed and pressure allows the |
% | production of discrete time Markov chains to stochastically produce |
% | the subsequent hour based on the current weather state. |
% | The user can input their own data into the LOAD_RAW_DATA_HERE script|
% | |
% | Cloud cover is produced with cloud length following a single power |
% | law distribution. Cloud fields are produced. These cloud fields |
% | represent the sky in a 2D plane. Clouds are repsresented using three|
% | values of x, y and r, where x,y define the centrepoint within the |
% | spatial domain, and r defines the radius of the cloud, this means |
% | that all clouds are represented as circles. With each time step, the|
% | clouds are moved according to the distacne covered based on the |
% | cloud movement speed. Each property can be covered by any of the |
% | clouds. This enablse spatially decorrelating profiles between |
% | neighbouring properties within the domain. |
% | |
% | Once cloud cover is derived, the irradiance is calculated at each |
% | property on a tilted plane. The user is strongly recommended to |
% | consult the published papers to learn more of the extent and |
% | limitations of this methodology. |
% +---------------------------------------------------------------------+
% | Please adhere to license. Appropriate citaion is required. |
% +---------------------------------------------------------------------+
% | Required citations for full use |
% | SIG originally developed: |
% | Bright, Jamie M.; Smith, Chris .J; Taylor, Peter G.; Crook, R. 2015.|
% | Stochastic generation of synthetic minutely irradiance time series |
% | derived from mean hourly weather observation data. |
% | Journal of Solar Energy. 115 229-242. |
% | |
% | Clear-sky distributions discovered: |
% | Smith, Chris; Bright, Jamie M.; Crook, Rolf. 2017. Cloud cover |
% | effect of clear-sky index distributions and differences between |
% | human and automatic cloud observations. |
% | Journal of Solar Energy. 144 10-21. |
% | |
% | SDSIG developed: |
% | Bright, Jamie M.; Babacan, Oytun; Kleissl, Jan; Taylor, Peter G.; |
% | Crook, R. 2017. A synthetic, spatially decorrelating solar |
% | irradiance generator and application to a LV grid model with high |
% | PV penetration. |
% | Journal of Solar Energy. 147 83-98. |
% | |
% | Requested citations to give full story |
% | Development of cloud motion fields |
% | Bright, Jamie M.; Taylor, Peter G.; Crook, R. 2015. |
% | Methodology to Stochastically Generate Spatially Relevant 1-Minute |
% | Resolution Irradiance Time Series from Mean Hourly Weather Data. |
% | 5th Solar Integration Workshop 2015, 19-20th October, Brussels, |
% | Belgium. |
% | |
% | Development of spatial decorrelation premise |
% | Bright, Jamie M.; Taylor, Peter, G. Crook, Rolf. 2015. |
% | Methodology to stochastically generate synthetic 1-minute irradiance|
% | time-series derived from mean hourly weather observational data. |
% | ISES Solar World Congress 2015, 8th-12th November 2015, Daegu, |
% | South Korea. |
% +---------------------------------------------------------------------+
% | Created by: Dr Jamie M. Bright |
% | Contributors: Dr Chris Smith, Dr Rolf Crook and Prof Peter G. Taylor|
% +---------------------------------------------------------------------+
% | Date completed: 30/01/2015 |
% | Code base updated on: 30/05/2018 |
% +---------------------------------------------------------------------+
%% Preamble
clear variables;
clc;
close all;
if ispc
addpath('utility\')
else
addpath('utility/')
end
InitialisePaths
%% SDSIG
SettingsForSDSIG
%% Load user data
LoadUserData
%% set time logic
SetTimeLogic
%% Safety checks of user deefined input
UserDefinedVariablesSafetyCheck
%% Raw data conversions and statistics derivation
RawDataConversionsAndStatistics
%% Markov creation
ConstructMarkovChains
%% Cloud cover production
LoadCloudSamples
%% Produce cloud cover for the specified duration
DeriveStochasticWeather
%% Solar geometry and clear-sky irradiance at centre of spatial domain
CalculateSolarGeometryAndClearSkyIrradiance
%% Derive cloud cover within the spatial domain
CloudMotionAndClearSkyIndices
%% Apply the clear-sky indices to the global horizontal irradiance and tilt it for each house
CalculateTiltedIrradianceAtEachHouse
%% Finished
Postamble
%% Plots and figures
PlotsAndFigures